From 46f3a52afa5faead1ad44d34237156ebc6886e19 Mon Sep 17 00:00:00 2001 From: Thomas Kappler Date: Mon, 18 Mar 2024 15:38:38 +0100 Subject: [PATCH] regenerate --- .../pulumi-resource-azure-native/schema.json | 838 ++++++++++++++- sdk/dotnet/Authorization/Enums.cs | 224 ++++ .../Authorization/GetRoleManagementPolicy.cs | 167 +++ .../Inputs/ApprovalSettingsArgs.cs | 59 ++ .../Authorization/Inputs/ApprovalStageArgs.cs | 71 ++ .../RoleManagementPolicyApprovalRuleArgs.cs | 48 + ...mentPolicyAuthenticationContextRuleArgs.cs | 54 + .../RoleManagementPolicyEnablementRuleArgs.cs | 54 + .../RoleManagementPolicyExpirationRuleArgs.cs | 54 + ...oleManagementPolicyNotificationRuleArgs.cs | 78 ++ .../RoleManagementPolicyRuleTargetArgs.cs | 83 ++ .../Authorization/Inputs/UserSetArgs.cs | 47 + .../Outputs/PolicyPropertiesResponse.cs | 30 + .../Outputs/PolicyPropertiesResponseScope.cs | 45 + .../Authorization/RoleManagementPolicy.cs | 184 ++++ sdk/dotnet/Authorization/V20201001/Enums.cs | 233 +++++ .../V20201001/GetRoleManagementPolicy.cs | 161 +++ .../V20201001/Inputs/ApprovalSettingsArgs.cs | 59 ++ .../V20201001/Inputs/ApprovalStageArgs.cs | 71 ++ .../RoleManagementPolicyApprovalRuleArgs.cs | 48 + ...mentPolicyAuthenticationContextRuleArgs.cs | 54 + .../RoleManagementPolicyEnablementRuleArgs.cs | 54 + .../RoleManagementPolicyExpirationRuleArgs.cs | 54 + ...oleManagementPolicyNotificationRuleArgs.cs | 78 ++ .../RoleManagementPolicyRuleTargetArgs.cs | 83 ++ .../V20201001/Inputs/UserSetArgs.cs | 47 + .../Outputs/PolicyPropertiesResponse.cs | 30 + .../Outputs/PolicyPropertiesResponseScope.cs | 45 + .../V20201001/RoleManagementPolicy.cs | 181 ++++ .../Authorization/V20201001Preview/Enums.cs | 233 +++++ .../GetRoleManagementPolicy.cs | 161 +++ .../Inputs/ApprovalSettingsArgs.cs | 59 ++ .../Inputs/ApprovalStageArgs.cs | 71 ++ .../RoleManagementPolicyApprovalRuleArgs.cs | 48 + ...mentPolicyAuthenticationContextRuleArgs.cs | 54 + .../RoleManagementPolicyEnablementRuleArgs.cs | 54 + .../RoleManagementPolicyExpirationRuleArgs.cs | 54 + ...oleManagementPolicyNotificationRuleArgs.cs | 78 ++ .../RoleManagementPolicyRuleTargetArgs.cs | 83 ++ .../V20201001Preview/Inputs/UserSetArgs.cs | 47 + .../Outputs/ApprovalSettingsResponse.cs | 59 ++ .../Outputs/ApprovalStageResponse.cs | 66 ++ .../Outputs/PolicyPropertiesResponse.cs | 27 + .../Outputs/PolicyPropertiesResponseScope.cs | 45 + ...oleManagementPolicyApprovalRuleResponse.cs | 53 + ...PolicyAuthenticationContextRuleResponse.cs | 60 ++ ...eManagementPolicyEnablementRuleResponse.cs | 53 + ...eManagementPolicyExpirationRuleResponse.cs | 60 ++ ...anagementPolicyNotificationRuleResponse.cs | 81 ++ .../RoleManagementPolicyRuleTargetResponse.cs | 66 ++ .../Outputs/UserSetResponse.cs | 52 + .../V20201001Preview/RoleManagementPolicy.cs | 181 ++++ sdk/python/pulumi_azure_native/__init__.py | 3 + .../authorization/__init__.py | 2 + .../authorization/_enums.py | 70 ++ .../authorization/_inputs.py | 838 +++++++++++++++ .../get_role_management_policy.py | 228 +++++ .../authorization/outputs.py | 88 ++ .../authorization/role_management_policy.py | 327 ++++++ .../authorization/v20201001/__init__.py | 4 + .../authorization/v20201001/_enums.py | 78 ++ .../authorization/v20201001/_inputs.py | 853 ++++++++++++++++ .../v20201001/get_role_management_policy.py | 222 ++++ .../authorization/v20201001/outputs.py | 89 ++ .../v20201001/role_management_policy.py | 321 ++++++ .../v20201001preview/__init__.py | 4 + .../authorization/v20201001preview/_enums.py | 78 ++ .../authorization/v20201001preview/_inputs.py | 853 ++++++++++++++++ .../get_role_management_policy.py | 222 ++++ .../authorization/v20201001preview/outputs.py | 959 ++++++++++++++++++ .../role_management_policy.py | 321 ++++++ 71 files changed, 10536 insertions(+), 3 deletions(-) create mode 100644 sdk/dotnet/Authorization/GetRoleManagementPolicy.cs create mode 100644 sdk/dotnet/Authorization/Inputs/ApprovalSettingsArgs.cs create mode 100644 sdk/dotnet/Authorization/Inputs/ApprovalStageArgs.cs create mode 100644 sdk/dotnet/Authorization/Inputs/RoleManagementPolicyApprovalRuleArgs.cs create mode 100644 sdk/dotnet/Authorization/Inputs/RoleManagementPolicyAuthenticationContextRuleArgs.cs create mode 100644 sdk/dotnet/Authorization/Inputs/RoleManagementPolicyEnablementRuleArgs.cs create mode 100644 sdk/dotnet/Authorization/Inputs/RoleManagementPolicyExpirationRuleArgs.cs create mode 100644 sdk/dotnet/Authorization/Inputs/RoleManagementPolicyNotificationRuleArgs.cs create mode 100644 sdk/dotnet/Authorization/Inputs/RoleManagementPolicyRuleTargetArgs.cs create mode 100644 sdk/dotnet/Authorization/Inputs/UserSetArgs.cs create mode 100644 sdk/dotnet/Authorization/Outputs/PolicyPropertiesResponse.cs create mode 100644 sdk/dotnet/Authorization/Outputs/PolicyPropertiesResponseScope.cs create mode 100644 sdk/dotnet/Authorization/RoleManagementPolicy.cs create mode 100644 sdk/dotnet/Authorization/V20201001/Enums.cs create mode 100644 sdk/dotnet/Authorization/V20201001/GetRoleManagementPolicy.cs create mode 100644 sdk/dotnet/Authorization/V20201001/Inputs/ApprovalSettingsArgs.cs create mode 100644 sdk/dotnet/Authorization/V20201001/Inputs/ApprovalStageArgs.cs create mode 100644 sdk/dotnet/Authorization/V20201001/Inputs/RoleManagementPolicyApprovalRuleArgs.cs create mode 100644 sdk/dotnet/Authorization/V20201001/Inputs/RoleManagementPolicyAuthenticationContextRuleArgs.cs create mode 100644 sdk/dotnet/Authorization/V20201001/Inputs/RoleManagementPolicyEnablementRuleArgs.cs create mode 100644 sdk/dotnet/Authorization/V20201001/Inputs/RoleManagementPolicyExpirationRuleArgs.cs create mode 100644 sdk/dotnet/Authorization/V20201001/Inputs/RoleManagementPolicyNotificationRuleArgs.cs create mode 100644 sdk/dotnet/Authorization/V20201001/Inputs/RoleManagementPolicyRuleTargetArgs.cs create mode 100644 sdk/dotnet/Authorization/V20201001/Inputs/UserSetArgs.cs create mode 100644 sdk/dotnet/Authorization/V20201001/Outputs/PolicyPropertiesResponse.cs create mode 100644 sdk/dotnet/Authorization/V20201001/Outputs/PolicyPropertiesResponseScope.cs create mode 100644 sdk/dotnet/Authorization/V20201001/RoleManagementPolicy.cs create mode 100644 sdk/dotnet/Authorization/V20201001Preview/Enums.cs create mode 100644 sdk/dotnet/Authorization/V20201001Preview/GetRoleManagementPolicy.cs create mode 100644 sdk/dotnet/Authorization/V20201001Preview/Inputs/ApprovalSettingsArgs.cs create mode 100644 sdk/dotnet/Authorization/V20201001Preview/Inputs/ApprovalStageArgs.cs create mode 100644 sdk/dotnet/Authorization/V20201001Preview/Inputs/RoleManagementPolicyApprovalRuleArgs.cs create mode 100644 sdk/dotnet/Authorization/V20201001Preview/Inputs/RoleManagementPolicyAuthenticationContextRuleArgs.cs create mode 100644 sdk/dotnet/Authorization/V20201001Preview/Inputs/RoleManagementPolicyEnablementRuleArgs.cs create mode 100644 sdk/dotnet/Authorization/V20201001Preview/Inputs/RoleManagementPolicyExpirationRuleArgs.cs create mode 100644 sdk/dotnet/Authorization/V20201001Preview/Inputs/RoleManagementPolicyNotificationRuleArgs.cs create mode 100644 sdk/dotnet/Authorization/V20201001Preview/Inputs/RoleManagementPolicyRuleTargetArgs.cs create mode 100644 sdk/dotnet/Authorization/V20201001Preview/Inputs/UserSetArgs.cs create mode 100644 sdk/dotnet/Authorization/V20201001Preview/Outputs/ApprovalSettingsResponse.cs create mode 100644 sdk/dotnet/Authorization/V20201001Preview/Outputs/ApprovalStageResponse.cs create mode 100644 sdk/dotnet/Authorization/V20201001Preview/Outputs/PolicyPropertiesResponse.cs create mode 100644 sdk/dotnet/Authorization/V20201001Preview/Outputs/PolicyPropertiesResponseScope.cs create mode 100644 sdk/dotnet/Authorization/V20201001Preview/Outputs/RoleManagementPolicyApprovalRuleResponse.cs create mode 100644 sdk/dotnet/Authorization/V20201001Preview/Outputs/RoleManagementPolicyAuthenticationContextRuleResponse.cs create mode 100644 sdk/dotnet/Authorization/V20201001Preview/Outputs/RoleManagementPolicyEnablementRuleResponse.cs create mode 100644 sdk/dotnet/Authorization/V20201001Preview/Outputs/RoleManagementPolicyExpirationRuleResponse.cs create mode 100644 sdk/dotnet/Authorization/V20201001Preview/Outputs/RoleManagementPolicyNotificationRuleResponse.cs create mode 100644 sdk/dotnet/Authorization/V20201001Preview/Outputs/RoleManagementPolicyRuleTargetResponse.cs create mode 100644 sdk/dotnet/Authorization/V20201001Preview/Outputs/UserSetResponse.cs create mode 100644 sdk/dotnet/Authorization/V20201001Preview/RoleManagementPolicy.cs create mode 100644 sdk/python/pulumi_azure_native/authorization/get_role_management_policy.py create mode 100644 sdk/python/pulumi_azure_native/authorization/role_management_policy.py create mode 100644 sdk/python/pulumi_azure_native/authorization/v20201001/_enums.py create mode 100644 sdk/python/pulumi_azure_native/authorization/v20201001/_inputs.py create mode 100644 sdk/python/pulumi_azure_native/authorization/v20201001/get_role_management_policy.py create mode 100644 sdk/python/pulumi_azure_native/authorization/v20201001/role_management_policy.py create mode 100644 sdk/python/pulumi_azure_native/authorization/v20201001preview/_enums.py create mode 100644 sdk/python/pulumi_azure_native/authorization/v20201001preview/_inputs.py create mode 100644 sdk/python/pulumi_azure_native/authorization/v20201001preview/get_role_management_policy.py create mode 100644 sdk/python/pulumi_azure_native/authorization/v20201001preview/role_management_policy.py diff --git a/provider/cmd/pulumi-resource-azure-native/schema.json b/provider/cmd/pulumi-resource-azure-native/schema.json index 9c3e58b74e38..a7051af53f12 100644 --- a/provider/cmd/pulumi-resource-azure-native/schema.json +++ b/provider/cmd/pulumi-resource-azure-native/schema.json @@ -21118,6 +21118,61 @@ "roleDefinitionId" ] }, + "azure-native:authorization:ApprovalMode": { + "description": "The type of rule", + "type": "string", + "enum": [ + { + "value": "SingleStage" + }, + { + "value": "Serial" + }, + { + "value": "Parallel" + }, + { + "value": "NoApproval" + } + ] + }, + "azure-native:authorization:ApprovalSettings": { + "description": "The approval settings.", + "properties": { + "approvalMode": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/types/azure-native:authorization:ApprovalMode" + } + ], + "description": "The type of rule" + }, + "approvalStages": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/types/azure-native:authorization:ApprovalStage" + }, + "description": "The approval stages of the request." + }, + "isApprovalRequired": { + "type": "boolean", + "description": "Determines whether approval is required or not." + }, + "isApprovalRequiredForExtension": { + "type": "boolean", + "description": "Determines whether approval is required for assignment extension." + }, + "isRequestorJustificationRequired": { + "type": "boolean", + "description": "Determine whether requestor justification is required." + } + }, + "type": "object" + }, "azure-native:authorization:ApprovalSettingsResponse": { "description": "The approval settings.", "properties": { @@ -21148,6 +21203,44 @@ }, "type": "object" }, + "azure-native:authorization:ApprovalStage": { + "description": "The approval stage.", + "properties": { + "approvalStageTimeOutInDays": { + "type": "integer", + "description": "The time in days when approval request would be timed out" + }, + "escalationApprovers": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/types/azure-native:authorization:UserSet" + }, + "description": "The escalation approver of the request." + }, + "escalationTimeInMinutes": { + "type": "integer", + "description": "The time in minutes when the approval request would be escalated if the primary approver does not approve" + }, + "isApproverJustificationRequired": { + "type": "boolean", + "description": "Determines whether approver need to provide justification for his decision." + }, + "isEscalationEnabled": { + "type": "boolean", + "description": "The value determine whether escalation feature is enabled." + }, + "primaryApprovers": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/types/azure-native:authorization:UserSet" + }, + "description": "The primary approver of the request." + } + }, + "type": "object" + }, "azure-native:authorization:ApprovalStageResponse": { "description": "The approval stage.", "properties": { @@ -21215,6 +21308,21 @@ } ] }, + "azure-native:authorization:EnablementRules": { + "description": "The type of enablement rule", + "type": "string", + "enum": [ + { + "value": "MultiFactorAuthentication" + }, + { + "value": "Justification" + }, + { + "value": "Ticketing" + } + ] + }, "azure-native:authorization:EnforcementMode": { "description": "The policy assignment enforcement mode. Possible values are Default and DoNotEnforce.", "type": "string", @@ -21376,6 +21484,30 @@ "message" ] }, + "azure-native:authorization:NotificationDeliveryMechanism": { + "description": "The type of notification.", + "type": "string", + "enum": [ + { + "value": "Email" + } + ] + }, + "azure-native:authorization:NotificationLevel": { + "description": "The notification level.", + "type": "string", + "enum": [ + { + "value": "None" + }, + { + "value": "Critical" + }, + { + "value": "All" + } + ] + }, "azure-native:authorization:Override": { "description": "The policy property value override.", "properties": { @@ -21942,6 +22074,38 @@ "type" ] }, + "azure-native:authorization:PolicyPropertiesResponse": { + "description": "Expanded info of resource scope", + "properties": { + "scope": { + "type": "object", + "$ref": "#/types/azure-native:authorization:PolicyPropertiesResponseScope", + "description": "Details of the resource scope" + } + }, + "type": "object", + "required": [ + "scope" + ] + }, + "azure-native:authorization:PolicyPropertiesResponseScope": { + "description": "Details of the resource scope", + "properties": { + "displayName": { + "type": "string", + "description": "Display name of the resource" + }, + "id": { + "type": "string", + "description": "Scope id of the resource" + }, + "type": { + "type": "string", + "description": "Type of the resource" + } + }, + "type": "object" + }, "azure-native:authorization:PolicySetDefinitionVersionResponse": { "description": "The policy set definition version.", "properties": { @@ -22190,6 +22354,21 @@ } ] }, + "azure-native:authorization:RecipientType": { + "description": "The recipient type.", + "type": "string", + "enum": [ + { + "value": "Requestor" + }, + { + "value": "Approver" + }, + { + "value": "Admin" + } + ] + }, "azure-native:authorization:ResourceIdentityType": { "description": "The identity type. This is the only required field when adding a system or user assigned identity to a resource.", "type": "string", @@ -22256,6 +22435,34 @@ }, "type": "object" }, + "azure-native:authorization:RoleManagementPolicyApprovalRule": { + "description": "The role management policy approval rule.", + "properties": { + "id": { + "type": "string", + "description": "The id of the rule." + }, + "ruleType": { + "type": "string", + "description": "The type of rule\nExpected value is 'RoleManagementPolicyApprovalRule'.", + "const": "RoleManagementPolicyApprovalRule" + }, + "setting": { + "type": "object", + "$ref": "#/types/azure-native:authorization:ApprovalSettings", + "description": "The approval setting" + }, + "target": { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyRuleTarget", + "description": "The target of the current rule." + } + }, + "type": "object", + "required": [ + "ruleType" + ] + }, "azure-native:authorization:RoleManagementPolicyApprovalRuleResponse": { "description": "The role management policy approval rule.", "properties": { @@ -22284,6 +22491,37 @@ "ruleType" ] }, + "azure-native:authorization:RoleManagementPolicyAuthenticationContextRule": { + "description": "The role management policy authentication context rule.", + "properties": { + "claimValue": { + "type": "string", + "description": "The claim value." + }, + "id": { + "type": "string", + "description": "The id of the rule." + }, + "isEnabled": { + "type": "boolean", + "description": "The value indicating if rule is enabled." + }, + "ruleType": { + "type": "string", + "description": "The type of rule\nExpected value is 'RoleManagementPolicyAuthenticationContextRule'.", + "const": "RoleManagementPolicyAuthenticationContextRule" + }, + "target": { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyRuleTarget", + "description": "The target of the current rule." + } + }, + "type": "object", + "required": [ + "ruleType" + ] + }, "azure-native:authorization:RoleManagementPolicyAuthenticationContextRuleResponse": { "description": "The role management policy authentication context rule.", "properties": { @@ -22315,6 +22553,43 @@ "ruleType" ] }, + "azure-native:authorization:RoleManagementPolicyEnablementRule": { + "description": "The role management policy enablement rule.", + "properties": { + "enabledRules": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/types/azure-native:authorization:EnablementRules" + } + ] + }, + "description": "The list of enabled rules." + }, + "id": { + "type": "string", + "description": "The id of the rule." + }, + "ruleType": { + "type": "string", + "description": "The type of rule\nExpected value is 'RoleManagementPolicyEnablementRule'.", + "const": "RoleManagementPolicyEnablementRule" + }, + "target": { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyRuleTarget", + "description": "The target of the current rule." + } + }, + "type": "object", + "required": [ + "ruleType" + ] + }, "azure-native:authorization:RoleManagementPolicyEnablementRuleResponse": { "description": "The role management policy enablement rule.", "properties": { @@ -22345,6 +22620,37 @@ "ruleType" ] }, + "azure-native:authorization:RoleManagementPolicyExpirationRule": { + "description": "The role management policy expiration rule.", + "properties": { + "id": { + "type": "string", + "description": "The id of the rule." + }, + "isExpirationRequired": { + "type": "boolean", + "description": "The value indicating whether expiration is required." + }, + "maximumDuration": { + "type": "string", + "description": "The maximum duration of expiration in timespan." + }, + "ruleType": { + "type": "string", + "description": "The type of rule\nExpected value is 'RoleManagementPolicyExpirationRule'.", + "const": "RoleManagementPolicyExpirationRule" + }, + "target": { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyRuleTarget", + "description": "The target of the current rule." + } + }, + "type": "object", + "required": [ + "ruleType" + ] + }, "azure-native:authorization:RoleManagementPolicyExpirationRuleResponse": { "description": "The role management policy expiration rule.", "properties": { @@ -22376,6 +22682,73 @@ "ruleType" ] }, + "azure-native:authorization:RoleManagementPolicyNotificationRule": { + "description": "The role management policy notification rule.", + "properties": { + "id": { + "type": "string", + "description": "The id of the rule." + }, + "isDefaultRecipientsEnabled": { + "type": "boolean", + "description": "Determines if the notification will be sent to the recipient type specified in the policy rule." + }, + "notificationLevel": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/types/azure-native:authorization:NotificationLevel" + } + ], + "description": "The notification level." + }, + "notificationRecipients": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The list of notification recipients." + }, + "notificationType": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/types/azure-native:authorization:NotificationDeliveryMechanism" + } + ], + "description": "The type of notification." + }, + "recipientType": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/types/azure-native:authorization:RecipientType" + } + ], + "description": "The recipient type." + }, + "ruleType": { + "type": "string", + "description": "The type of rule\nExpected value is 'RoleManagementPolicyNotificationRule'.", + "const": "RoleManagementPolicyNotificationRule" + }, + "target": { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyRuleTarget", + "description": "The target of the current rule." + } + }, + "type": "object", + "required": [ + "ruleType" + ] + }, "azure-native:authorization:RoleManagementPolicyNotificationRuleResponse": { "description": "The role management policy notification rule.", "properties": { @@ -22422,6 +22795,48 @@ "ruleType" ] }, + "azure-native:authorization:RoleManagementPolicyRuleTarget": { + "description": "The role management policy rule target.", + "properties": { + "caller": { + "type": "string", + "description": "The caller of the setting." + }, + "enforcedSettings": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The list of enforced settings." + }, + "inheritableSettings": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The list of inheritable settings." + }, + "level": { + "type": "string", + "description": "The assignment level to which rule is applied." + }, + "operations": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The type of operation." + }, + "targetObjects": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The list of target objects." + } + }, + "type": "object" + }, "azure-native:authorization:RoleManagementPolicyRuleTargetResponse": { "description": "The role management policy rule target.", "properties": { @@ -22464,6 +22879,27 @@ }, "type": "object" }, + "azure-native:authorization:RoleManagementPolicyRuleType": { + "description": "The type of rule", + "type": "string", + "enum": [ + { + "value": "RoleManagementPolicyApprovalRule" + }, + { + "value": "RoleManagementPolicyAuthenticationContextRule" + }, + { + "value": "RoleManagementPolicyEnablementRule" + }, + { + "value": "RoleManagementPolicyExpirationRule" + }, + { + "value": "RoleManagementPolicyNotificationRule" + } + ] + }, "azure-native:authorization:Selector": { "description": "The selector expression.", "properties": { @@ -22571,6 +23007,35 @@ }, "type": "object" }, + "azure-native:authorization:UserSet": { + "description": "The detail of a user.", + "properties": { + "description": { + "type": "string", + "description": "The description of the user." + }, + "id": { + "type": "string", + "description": "The object id of the user." + }, + "isBackup": { + "type": "boolean", + "description": "The value indicating whether the user is a backup fallback approver" + }, + "userType": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/types/azure-native:authorization:UserType" + } + ], + "description": "The type of user." + } + }, + "type": "object" + }, "azure-native:authorization:UserSetResponse": { "description": "The detail of a user.", "properties": { @@ -22593,6 +23058,18 @@ }, "type": "object" }, + "azure-native:authorization:UserType": { + "description": "The type of user.", + "type": "string", + "enum": [ + { + "value": "User" + }, + { + "value": "Group" + } + ] + }, "azure-native:automanage:AccountIdentity": { "description": "Identity for the Automanage account.", "properties": { @@ -471299,6 +471776,206 @@ } ] }, + "azure-native:authorization:RoleManagementPolicy": { + "description": "Role management policy\nAzure REST API version: 2020-10-01.\n\nOther available API versions: 2020-10-01-preview.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n### PatchPartialRoleManagementPolicy\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var roleManagementPolicy = new AzureNative.Authorization.RoleManagementPolicy(\"roleManagementPolicy\", new()\n {\n RoleManagementPolicyName = \"570c3619-7688-4b34-b290-2b8bb3ccab2a\",\n Rules = \n {\n new AzureNative.Authorization.Inputs.RoleManagementPolicyExpirationRuleArgs\n {\n Id = \"Expiration_Admin_Eligibility\",\n IsExpirationRequired = false,\n MaximumDuration = \"P180D\",\n RuleType = \"RoleManagementPolicyExpirationRule\",\n Target = new AzureNative.Authorization.Inputs.RoleManagementPolicyRuleTargetArgs\n {\n Caller = \"Admin\",\n Level = \"Eligibility\",\n Operations = new[]\n {\n \"All\",\n },\n },\n },\n new AzureNative.Authorization.Inputs.RoleManagementPolicyNotificationRuleArgs\n {\n Id = \"Notification_Admin_Admin_Eligibility\",\n IsDefaultRecipientsEnabled = false,\n NotificationLevel = \"Critical\",\n NotificationRecipients = new[]\n {\n \"admin_admin_eligible@test.com\",\n },\n NotificationType = \"Email\",\n RecipientType = \"Admin\",\n RuleType = \"RoleManagementPolicyNotificationRule\",\n Target = new AzureNative.Authorization.Inputs.RoleManagementPolicyRuleTargetArgs\n {\n Caller = \"Admin\",\n Level = \"Eligibility\",\n Operations = new[]\n {\n \"All\",\n },\n },\n },\n },\n Scope = \"providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/authorization/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := authorization.NewRoleManagementPolicy(ctx, \"roleManagementPolicy\", \u0026authorization.RoleManagementPolicyArgs{\n\t\t\tRoleManagementPolicyName: pulumi.String(\"570c3619-7688-4b34-b290-2b8bb3ccab2a\"),\n\t\t\tRules: pulumi.Array{\n\t\t\t\tauthorization.RoleManagementPolicyExpirationRule{\n\t\t\t\t\tId: \"Expiration_Admin_Eligibility\",\n\t\t\t\t\tIsExpirationRequired: false,\n\t\t\t\t\tMaximumDuration: \"P180D\",\n\t\t\t\t\tRuleType: \"RoleManagementPolicyExpirationRule\",\n\t\t\t\t\tTarget: authorization.RoleManagementPolicyRuleTarget{\n\t\t\t\t\t\tCaller: \"Admin\",\n\t\t\t\t\t\tLevel: \"Eligibility\",\n\t\t\t\t\t\tOperations: []string{\n\t\t\t\t\t\t\t\"All\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tauthorization.RoleManagementPolicyNotificationRule{\n\t\t\t\t\tId: \"Notification_Admin_Admin_Eligibility\",\n\t\t\t\t\tIsDefaultRecipientsEnabled: false,\n\t\t\t\t\tNotificationLevel: \"Critical\",\n\t\t\t\t\tNotificationRecipients: []string{\n\t\t\t\t\t\t\"admin_admin_eligible@test.com\",\n\t\t\t\t\t},\n\t\t\t\t\tNotificationType: \"Email\",\n\t\t\t\t\tRecipientType: \"Admin\",\n\t\t\t\t\tRuleType: \"RoleManagementPolicyNotificationRule\",\n\t\t\t\t\tTarget: authorization.RoleManagementPolicyRuleTarget{\n\t\t\t\t\t\tCaller: \"Admin\",\n\t\t\t\t\t\tLevel: \"Eligibility\",\n\t\t\t\t\t\tOperations: []string{\n\t\t\t\t\t\t\t\"All\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tScope: pulumi.String(\"providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.authorization.RoleManagementPolicy;\nimport com.pulumi.azurenative.authorization.RoleManagementPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var roleManagementPolicy = new RoleManagementPolicy(\"roleManagementPolicy\", RoleManagementPolicyArgs.builder() \n .roleManagementPolicyName(\"570c3619-7688-4b34-b290-2b8bb3ccab2a\")\n .rules( \n RoleManagementPolicyExpirationRuleArgs.builder()\n .id(\"Expiration_Admin_Eligibility\")\n .isExpirationRequired(false)\n .maximumDuration(\"P180D\")\n .ruleType(\"RoleManagementPolicyExpirationRule\")\n .target(RoleManagementPolicyRuleTargetArgs.builder()\n .caller(\"Admin\")\n .level(\"Eligibility\")\n .operations(\"All\")\n .build())\n .build(),\n RoleManagementPolicyNotificationRuleArgs.builder()\n .id(\"Notification_Admin_Admin_Eligibility\")\n .isDefaultRecipientsEnabled(false)\n .notificationLevel(\"Critical\")\n .notificationRecipients(\"admin_admin_eligible@test.com\")\n .notificationType(\"Email\")\n .recipientType(\"Admin\")\n .ruleType(\"RoleManagementPolicyNotificationRule\")\n .target(RoleManagementPolicyRuleTargetArgs.builder()\n .caller(\"Admin\")\n .level(\"Eligibility\")\n .operations(\"All\")\n .build())\n .build())\n .scope(\"providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst roleManagementPolicy = new azure_native.authorization.RoleManagementPolicy(\"roleManagementPolicy\", {\n roleManagementPolicyName: \"570c3619-7688-4b34-b290-2b8bb3ccab2a\",\n rules: [\n {\n id: \"Expiration_Admin_Eligibility\",\n isExpirationRequired: false,\n maximumDuration: \"P180D\",\n ruleType: \"RoleManagementPolicyExpirationRule\",\n target: {\n caller: \"Admin\",\n level: \"Eligibility\",\n operations: [\"All\"],\n },\n },\n {\n id: \"Notification_Admin_Admin_Eligibility\",\n isDefaultRecipientsEnabled: false,\n notificationLevel: \"Critical\",\n notificationRecipients: [\"admin_admin_eligible@test.com\"],\n notificationType: \"Email\",\n recipientType: \"Admin\",\n ruleType: \"RoleManagementPolicyNotificationRule\",\n target: {\n caller: \"Admin\",\n level: \"Eligibility\",\n operations: [\"All\"],\n },\n },\n ],\n scope: \"providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nrole_management_policy = azure_native.authorization.RoleManagementPolicy(\"roleManagementPolicy\",\n role_management_policy_name=\"570c3619-7688-4b34-b290-2b8bb3ccab2a\",\n rules=[\n azure_native.authorization.RoleManagementPolicyExpirationRuleArgs(\n id=\"Expiration_Admin_Eligibility\",\n is_expiration_required=False,\n maximum_duration=\"P180D\",\n rule_type=\"RoleManagementPolicyExpirationRule\",\n target=azure_native.authorization.RoleManagementPolicyRuleTargetArgs(\n caller=\"Admin\",\n level=\"Eligibility\",\n operations=[\"All\"],\n ),\n ),\n azure_native.authorization.RoleManagementPolicyNotificationRuleArgs(\n id=\"Notification_Admin_Admin_Eligibility\",\n is_default_recipients_enabled=False,\n notification_level=\"Critical\",\n notification_recipients=[\"admin_admin_eligible@test.com\"],\n notification_type=\"Email\",\n recipient_type=\"Admin\",\n rule_type=\"RoleManagementPolicyNotificationRule\",\n target=azure_native.authorization.RoleManagementPolicyRuleTargetArgs(\n caller=\"Admin\",\n level=\"Eligibility\",\n operations=[\"All\"],\n ),\n ),\n ],\n scope=\"providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368\")\n\n```\n\n```yaml\nresources:\n roleManagementPolicy:\n type: azure-native:authorization:RoleManagementPolicy\n properties:\n roleManagementPolicyName: 570c3619-7688-4b34-b290-2b8bb3ccab2a\n rules:\n - id: Expiration_Admin_Eligibility\n isExpirationRequired: false\n maximumDuration: P180D\n ruleType: RoleManagementPolicyExpirationRule\n target:\n caller: Admin\n level: Eligibility\n operations:\n - All\n - id: Notification_Admin_Admin_Eligibility\n isDefaultRecipientsEnabled: false\n notificationLevel: Critical\n notificationRecipients:\n - admin_admin_eligible@test.com\n notificationType: Email\n recipientType: Admin\n ruleType: RoleManagementPolicyNotificationRule\n target:\n caller: Admin\n level: Eligibility\n operations:\n - All\n scope: providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368\n\n```\n\n{{% /example %}}\n{{% example %}}\n### PatchRoleManagementPolicy\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var roleManagementPolicy = new AzureNative.Authorization.RoleManagementPolicy(\"roleManagementPolicy\", new()\n {\n RoleManagementPolicyName = \"570c3619-7688-4b34-b290-2b8bb3ccab2a\",\n Rules = \n {\n new AzureNative.Authorization.Inputs.RoleManagementPolicyExpirationRuleArgs\n {\n Id = \"Expiration_Admin_Eligibility\",\n IsExpirationRequired = false,\n MaximumDuration = \"P180D\",\n RuleType = \"RoleManagementPolicyExpirationRule\",\n Target = new AzureNative.Authorization.Inputs.RoleManagementPolicyRuleTargetArgs\n {\n Caller = \"Admin\",\n Level = \"Eligibility\",\n Operations = new[]\n {\n \"All\",\n },\n },\n },\n new AzureNative.Authorization.Inputs.RoleManagementPolicyNotificationRuleArgs\n {\n Id = \"Notification_Admin_Admin_Eligibility\",\n IsDefaultRecipientsEnabled = false,\n NotificationLevel = \"Critical\",\n NotificationRecipients = new[]\n {\n \"admin_admin_eligible@test.com\",\n },\n NotificationType = \"Email\",\n RecipientType = \"Admin\",\n RuleType = \"RoleManagementPolicyNotificationRule\",\n Target = new AzureNative.Authorization.Inputs.RoleManagementPolicyRuleTargetArgs\n {\n Caller = \"Admin\",\n Level = \"Eligibility\",\n Operations = new[]\n {\n \"All\",\n },\n },\n },\n new AzureNative.Authorization.Inputs.RoleManagementPolicyNotificationRuleArgs\n {\n Id = \"Notification_Requestor_Admin_Eligibility\",\n IsDefaultRecipientsEnabled = false,\n NotificationLevel = \"Critical\",\n NotificationRecipients = new[]\n {\n \"requestor_admin_eligible@test.com\",\n },\n NotificationType = \"Email\",\n RecipientType = \"Requestor\",\n RuleType = \"RoleManagementPolicyNotificationRule\",\n Target = new AzureNative.Authorization.Inputs.RoleManagementPolicyRuleTargetArgs\n {\n Caller = \"Admin\",\n Level = \"Eligibility\",\n Operations = new[]\n {\n \"All\",\n },\n },\n },\n new AzureNative.Authorization.Inputs.RoleManagementPolicyNotificationRuleArgs\n {\n Id = \"Notification_Approver_Admin_Eligibility\",\n IsDefaultRecipientsEnabled = false,\n NotificationLevel = \"Critical\",\n NotificationRecipients = new[]\n {\n \"approver_admin_eligible@test.com\",\n },\n NotificationType = \"Email\",\n RecipientType = \"Approver\",\n RuleType = \"RoleManagementPolicyNotificationRule\",\n Target = new AzureNative.Authorization.Inputs.RoleManagementPolicyRuleTargetArgs\n {\n Caller = \"Admin\",\n Level = \"Eligibility\",\n Operations = new[]\n {\n \"All\",\n },\n },\n },\n new AzureNative.Authorization.Inputs.RoleManagementPolicyEnablementRuleArgs\n {\n EnabledRules = new() { },\n Id = \"Enablement_Admin_Eligibility\",\n RuleType = \"RoleManagementPolicyEnablementRule\",\n Target = new AzureNative.Authorization.Inputs.RoleManagementPolicyRuleTargetArgs\n {\n Caller = \"Admin\",\n Level = \"Eligibility\",\n Operations = new[]\n {\n \"All\",\n },\n },\n },\n new AzureNative.Authorization.Inputs.RoleManagementPolicyExpirationRuleArgs\n {\n Id = \"Expiration_Admin_Assignment\",\n IsExpirationRequired = false,\n MaximumDuration = \"P90D\",\n RuleType = \"RoleManagementPolicyExpirationRule\",\n Target = new AzureNative.Authorization.Inputs.RoleManagementPolicyRuleTargetArgs\n {\n Caller = \"Admin\",\n Level = \"Assignment\",\n Operations = new[]\n {\n \"All\",\n },\n },\n },\n new AzureNative.Authorization.Inputs.RoleManagementPolicyEnablementRuleArgs\n {\n EnabledRules = new[]\n {\n \"Justification\",\n \"MultiFactorAuthentication\",\n },\n Id = \"Enablement_Admin_Assignment\",\n RuleType = \"RoleManagementPolicyEnablementRule\",\n Target = new AzureNative.Authorization.Inputs.RoleManagementPolicyRuleTargetArgs\n {\n Caller = \"Admin\",\n Level = \"Assignment\",\n Operations = new[]\n {\n \"All\",\n },\n },\n },\n new AzureNative.Authorization.Inputs.RoleManagementPolicyNotificationRuleArgs\n {\n Id = \"Notification_Admin_Admin_Assignment\",\n IsDefaultRecipientsEnabled = false,\n NotificationLevel = \"Critical\",\n NotificationRecipients = new[]\n {\n \"admin_admin_member@test.com\",\n },\n NotificationType = \"Email\",\n RecipientType = \"Admin\",\n RuleType = \"RoleManagementPolicyNotificationRule\",\n Target = new AzureNative.Authorization.Inputs.RoleManagementPolicyRuleTargetArgs\n {\n Caller = \"Admin\",\n Level = \"Assignment\",\n Operations = new[]\n {\n \"All\",\n },\n },\n },\n new AzureNative.Authorization.Inputs.RoleManagementPolicyNotificationRuleArgs\n {\n Id = \"Notification_Requestor_Admin_Assignment\",\n IsDefaultRecipientsEnabled = false,\n NotificationLevel = \"Critical\",\n NotificationRecipients = new[]\n {\n \"requestor_admin_member@test.com\",\n },\n NotificationType = \"Email\",\n RecipientType = \"Requestor\",\n RuleType = \"RoleManagementPolicyNotificationRule\",\n Target = new AzureNative.Authorization.Inputs.RoleManagementPolicyRuleTargetArgs\n {\n Caller = \"Admin\",\n Level = \"Assignment\",\n Operations = new[]\n {\n \"All\",\n },\n },\n },\n new AzureNative.Authorization.Inputs.RoleManagementPolicyNotificationRuleArgs\n {\n Id = \"Notification_Approver_Admin_Assignment\",\n IsDefaultRecipientsEnabled = false,\n NotificationLevel = \"Critical\",\n NotificationRecipients = new[]\n {\n \"approver_admin_member@test.com\",\n },\n NotificationType = \"Email\",\n RecipientType = \"Approver\",\n RuleType = \"RoleManagementPolicyNotificationRule\",\n Target = new AzureNative.Authorization.Inputs.RoleManagementPolicyRuleTargetArgs\n {\n Caller = \"Admin\",\n Level = \"Assignment\",\n Operations = new[]\n {\n \"All\",\n },\n },\n },\n new AzureNative.Authorization.Inputs.RoleManagementPolicyExpirationRuleArgs\n {\n Id = \"Expiration_EndUser_Assignment\",\n IsExpirationRequired = true,\n MaximumDuration = \"PT7H\",\n RuleType = \"RoleManagementPolicyExpirationRule\",\n Target = new AzureNative.Authorization.Inputs.RoleManagementPolicyRuleTargetArgs\n {\n Caller = \"EndUser\",\n Level = \"Assignment\",\n Operations = new[]\n {\n \"All\",\n },\n },\n },\n new AzureNative.Authorization.Inputs.RoleManagementPolicyEnablementRuleArgs\n {\n EnabledRules = new[]\n {\n \"Justification\",\n \"MultiFactorAuthentication\",\n \"Ticketing\",\n },\n Id = \"Enablement_EndUser_Assignment\",\n RuleType = \"RoleManagementPolicyEnablementRule\",\n Target = new AzureNative.Authorization.Inputs.RoleManagementPolicyRuleTargetArgs\n {\n Caller = \"EndUser\",\n Level = \"Assignment\",\n Operations = new[]\n {\n \"All\",\n },\n },\n },\n new AzureNative.Authorization.Inputs.RoleManagementPolicyApprovalRuleArgs\n {\n Id = \"Approval_EndUser_Assignment\",\n RuleType = \"RoleManagementPolicyApprovalRule\",\n Setting = new AzureNative.Authorization.Inputs.ApprovalSettingsArgs\n {\n ApprovalMode = \"SingleStage\",\n ApprovalStages = new[]\n {\n new AzureNative.Authorization.Inputs.ApprovalStageArgs\n {\n ApprovalStageTimeOutInDays = 1,\n EscalationTimeInMinutes = 0,\n IsApproverJustificationRequired = true,\n IsEscalationEnabled = false,\n PrimaryApprovers = new[]\n {\n new AzureNative.Authorization.Inputs.UserSetArgs\n {\n Description = \"amansw_new_group\",\n Id = \"2385b0f3-5fa9-43cf-8ca4-b01dc97298cd\",\n IsBackup = false,\n UserType = \"Group\",\n },\n new AzureNative.Authorization.Inputs.UserSetArgs\n {\n Description = \"amansw_group\",\n Id = \"2f4913c9-d15b-406a-9946-1d66a28f2690\",\n IsBackup = false,\n UserType = \"Group\",\n },\n },\n },\n },\n IsApprovalRequired = true,\n IsApprovalRequiredForExtension = false,\n IsRequestorJustificationRequired = true,\n },\n Target = new AzureNative.Authorization.Inputs.RoleManagementPolicyRuleTargetArgs\n {\n Caller = \"EndUser\",\n Level = \"Assignment\",\n Operations = new[]\n {\n \"All\",\n },\n },\n },\n new AzureNative.Authorization.Inputs.RoleManagementPolicyAuthenticationContextRuleArgs\n {\n ClaimValue = \"\",\n Id = \"AuthenticationContext_EndUser_Assignment\",\n IsEnabled = false,\n RuleType = \"RoleManagementPolicyAuthenticationContextRule\",\n Target = new AzureNative.Authorization.Inputs.RoleManagementPolicyRuleTargetArgs\n {\n Caller = \"EndUser\",\n Level = \"Assignment\",\n Operations = new[]\n {\n \"All\",\n },\n },\n },\n new AzureNative.Authorization.Inputs.RoleManagementPolicyNotificationRuleArgs\n {\n Id = \"Notification_Admin_EndUser_Assignment\",\n IsDefaultRecipientsEnabled = false,\n NotificationLevel = \"Critical\",\n NotificationRecipients = new[]\n {\n \"admin_enduser_member@test.com\",\n },\n NotificationType = \"Email\",\n RecipientType = \"Admin\",\n RuleType = \"RoleManagementPolicyNotificationRule\",\n Target = new AzureNative.Authorization.Inputs.RoleManagementPolicyRuleTargetArgs\n {\n Caller = \"EndUser\",\n Level = \"Assignment\",\n Operations = new[]\n {\n \"All\",\n },\n },\n },\n new AzureNative.Authorization.Inputs.RoleManagementPolicyNotificationRuleArgs\n {\n Id = \"Notification_Requestor_EndUser_Assignment\",\n IsDefaultRecipientsEnabled = false,\n NotificationLevel = \"Critical\",\n NotificationRecipients = new[]\n {\n \"requestor_enduser_member@test.com\",\n },\n NotificationType = \"Email\",\n RecipientType = \"Requestor\",\n RuleType = \"RoleManagementPolicyNotificationRule\",\n Target = new AzureNative.Authorization.Inputs.RoleManagementPolicyRuleTargetArgs\n {\n Caller = \"EndUser\",\n Level = \"Assignment\",\n Operations = new[]\n {\n \"All\",\n },\n },\n },\n new AzureNative.Authorization.Inputs.RoleManagementPolicyNotificationRuleArgs\n {\n Id = \"Notification_Approver_EndUser_Assignment\",\n IsDefaultRecipientsEnabled = true,\n NotificationLevel = \"Critical\",\n NotificationType = \"Email\",\n RecipientType = \"Approver\",\n RuleType = \"RoleManagementPolicyNotificationRule\",\n Target = new AzureNative.Authorization.Inputs.RoleManagementPolicyRuleTargetArgs\n {\n Caller = \"EndUser\",\n Level = \"Assignment\",\n Operations = new[]\n {\n \"All\",\n },\n },\n },\n },\n Scope = \"providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/authorization/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := authorization.NewRoleManagementPolicy(ctx, \"roleManagementPolicy\", \u0026authorization.RoleManagementPolicyArgs{\n\t\t\tRoleManagementPolicyName: pulumi.String(\"570c3619-7688-4b34-b290-2b8bb3ccab2a\"),\n\t\t\tRules: pulumi.Array{\n\t\t\t\tauthorization.RoleManagementPolicyExpirationRule{\n\t\t\t\t\tId: \"Expiration_Admin_Eligibility\",\n\t\t\t\t\tIsExpirationRequired: false,\n\t\t\t\t\tMaximumDuration: \"P180D\",\n\t\t\t\t\tRuleType: \"RoleManagementPolicyExpirationRule\",\n\t\t\t\t\tTarget: authorization.RoleManagementPolicyRuleTarget{\n\t\t\t\t\t\tCaller: \"Admin\",\n\t\t\t\t\t\tLevel: \"Eligibility\",\n\t\t\t\t\t\tOperations: []string{\n\t\t\t\t\t\t\t\"All\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tauthorization.RoleManagementPolicyNotificationRule{\n\t\t\t\t\tId: \"Notification_Admin_Admin_Eligibility\",\n\t\t\t\t\tIsDefaultRecipientsEnabled: false,\n\t\t\t\t\tNotificationLevel: \"Critical\",\n\t\t\t\t\tNotificationRecipients: []string{\n\t\t\t\t\t\t\"admin_admin_eligible@test.com\",\n\t\t\t\t\t},\n\t\t\t\t\tNotificationType: \"Email\",\n\t\t\t\t\tRecipientType: \"Admin\",\n\t\t\t\t\tRuleType: \"RoleManagementPolicyNotificationRule\",\n\t\t\t\t\tTarget: authorization.RoleManagementPolicyRuleTarget{\n\t\t\t\t\t\tCaller: \"Admin\",\n\t\t\t\t\t\tLevel: \"Eligibility\",\n\t\t\t\t\t\tOperations: []string{\n\t\t\t\t\t\t\t\"All\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tauthorization.RoleManagementPolicyNotificationRule{\n\t\t\t\t\tId: \"Notification_Requestor_Admin_Eligibility\",\n\t\t\t\t\tIsDefaultRecipientsEnabled: false,\n\t\t\t\t\tNotificationLevel: \"Critical\",\n\t\t\t\t\tNotificationRecipients: []string{\n\t\t\t\t\t\t\"requestor_admin_eligible@test.com\",\n\t\t\t\t\t},\n\t\t\t\t\tNotificationType: \"Email\",\n\t\t\t\t\tRecipientType: \"Requestor\",\n\t\t\t\t\tRuleType: \"RoleManagementPolicyNotificationRule\",\n\t\t\t\t\tTarget: authorization.RoleManagementPolicyRuleTarget{\n\t\t\t\t\t\tCaller: \"Admin\",\n\t\t\t\t\t\tLevel: \"Eligibility\",\n\t\t\t\t\t\tOperations: []string{\n\t\t\t\t\t\t\t\"All\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tauthorization.RoleManagementPolicyNotificationRule{\n\t\t\t\t\tId: \"Notification_Approver_Admin_Eligibility\",\n\t\t\t\t\tIsDefaultRecipientsEnabled: false,\n\t\t\t\t\tNotificationLevel: \"Critical\",\n\t\t\t\t\tNotificationRecipients: []string{\n\t\t\t\t\t\t\"approver_admin_eligible@test.com\",\n\t\t\t\t\t},\n\t\t\t\t\tNotificationType: \"Email\",\n\t\t\t\t\tRecipientType: \"Approver\",\n\t\t\t\t\tRuleType: \"RoleManagementPolicyNotificationRule\",\n\t\t\t\t\tTarget: authorization.RoleManagementPolicyRuleTarget{\n\t\t\t\t\t\tCaller: \"Admin\",\n\t\t\t\t\t\tLevel: \"Eligibility\",\n\t\t\t\t\t\tOperations: []string{\n\t\t\t\t\t\t\t\"All\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tauthorization.RoleManagementPolicyEnablementRule{\n\t\t\t\t\tEnabledRules: []authorization.EnablementRules{},\n\t\t\t\t\tId: \"Enablement_Admin_Eligibility\",\n\t\t\t\t\tRuleType: \"RoleManagementPolicyEnablementRule\",\n\t\t\t\t\tTarget: authorization.RoleManagementPolicyRuleTarget{\n\t\t\t\t\t\tCaller: \"Admin\",\n\t\t\t\t\t\tLevel: \"Eligibility\",\n\t\t\t\t\t\tOperations: []string{\n\t\t\t\t\t\t\t\"All\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tauthorization.RoleManagementPolicyExpirationRule{\n\t\t\t\t\tId: \"Expiration_Admin_Assignment\",\n\t\t\t\t\tIsExpirationRequired: false,\n\t\t\t\t\tMaximumDuration: \"P90D\",\n\t\t\t\t\tRuleType: \"RoleManagementPolicyExpirationRule\",\n\t\t\t\t\tTarget: authorization.RoleManagementPolicyRuleTarget{\n\t\t\t\t\t\tCaller: \"Admin\",\n\t\t\t\t\t\tLevel: \"Assignment\",\n\t\t\t\t\t\tOperations: []string{\n\t\t\t\t\t\t\t\"All\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tauthorization.RoleManagementPolicyEnablementRule{\n\t\t\t\t\tEnabledRules: []authorization.EnablementRules{\n\t\t\t\t\t\t\"Justification\",\n\t\t\t\t\t\t\"MultiFactorAuthentication\",\n\t\t\t\t\t},\n\t\t\t\t\tId: \"Enablement_Admin_Assignment\",\n\t\t\t\t\tRuleType: \"RoleManagementPolicyEnablementRule\",\n\t\t\t\t\tTarget: authorization.RoleManagementPolicyRuleTarget{\n\t\t\t\t\t\tCaller: \"Admin\",\n\t\t\t\t\t\tLevel: \"Assignment\",\n\t\t\t\t\t\tOperations: []string{\n\t\t\t\t\t\t\t\"All\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tauthorization.RoleManagementPolicyNotificationRule{\n\t\t\t\t\tId: \"Notification_Admin_Admin_Assignment\",\n\t\t\t\t\tIsDefaultRecipientsEnabled: false,\n\t\t\t\t\tNotificationLevel: \"Critical\",\n\t\t\t\t\tNotificationRecipients: []string{\n\t\t\t\t\t\t\"admin_admin_member@test.com\",\n\t\t\t\t\t},\n\t\t\t\t\tNotificationType: \"Email\",\n\t\t\t\t\tRecipientType: \"Admin\",\n\t\t\t\t\tRuleType: \"RoleManagementPolicyNotificationRule\",\n\t\t\t\t\tTarget: authorization.RoleManagementPolicyRuleTarget{\n\t\t\t\t\t\tCaller: \"Admin\",\n\t\t\t\t\t\tLevel: \"Assignment\",\n\t\t\t\t\t\tOperations: []string{\n\t\t\t\t\t\t\t\"All\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tauthorization.RoleManagementPolicyNotificationRule{\n\t\t\t\t\tId: \"Notification_Requestor_Admin_Assignment\",\n\t\t\t\t\tIsDefaultRecipientsEnabled: false,\n\t\t\t\t\tNotificationLevel: \"Critical\",\n\t\t\t\t\tNotificationRecipients: []string{\n\t\t\t\t\t\t\"requestor_admin_member@test.com\",\n\t\t\t\t\t},\n\t\t\t\t\tNotificationType: \"Email\",\n\t\t\t\t\tRecipientType: \"Requestor\",\n\t\t\t\t\tRuleType: \"RoleManagementPolicyNotificationRule\",\n\t\t\t\t\tTarget: authorization.RoleManagementPolicyRuleTarget{\n\t\t\t\t\t\tCaller: \"Admin\",\n\t\t\t\t\t\tLevel: \"Assignment\",\n\t\t\t\t\t\tOperations: []string{\n\t\t\t\t\t\t\t\"All\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tauthorization.RoleManagementPolicyNotificationRule{\n\t\t\t\t\tId: \"Notification_Approver_Admin_Assignment\",\n\t\t\t\t\tIsDefaultRecipientsEnabled: false,\n\t\t\t\t\tNotificationLevel: \"Critical\",\n\t\t\t\t\tNotificationRecipients: []string{\n\t\t\t\t\t\t\"approver_admin_member@test.com\",\n\t\t\t\t\t},\n\t\t\t\t\tNotificationType: \"Email\",\n\t\t\t\t\tRecipientType: \"Approver\",\n\t\t\t\t\tRuleType: \"RoleManagementPolicyNotificationRule\",\n\t\t\t\t\tTarget: authorization.RoleManagementPolicyRuleTarget{\n\t\t\t\t\t\tCaller: \"Admin\",\n\t\t\t\t\t\tLevel: \"Assignment\",\n\t\t\t\t\t\tOperations: []string{\n\t\t\t\t\t\t\t\"All\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tauthorization.RoleManagementPolicyExpirationRule{\n\t\t\t\t\tId: \"Expiration_EndUser_Assignment\",\n\t\t\t\t\tIsExpirationRequired: true,\n\t\t\t\t\tMaximumDuration: \"PT7H\",\n\t\t\t\t\tRuleType: \"RoleManagementPolicyExpirationRule\",\n\t\t\t\t\tTarget: authorization.RoleManagementPolicyRuleTarget{\n\t\t\t\t\t\tCaller: \"EndUser\",\n\t\t\t\t\t\tLevel: \"Assignment\",\n\t\t\t\t\t\tOperations: []string{\n\t\t\t\t\t\t\t\"All\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tauthorization.RoleManagementPolicyEnablementRule{\n\t\t\t\t\tEnabledRules: []authorization.EnablementRules{\n\t\t\t\t\t\t\"Justification\",\n\t\t\t\t\t\t\"MultiFactorAuthentication\",\n\t\t\t\t\t\t\"Ticketing\",\n\t\t\t\t\t},\n\t\t\t\t\tId: \"Enablement_EndUser_Assignment\",\n\t\t\t\t\tRuleType: \"RoleManagementPolicyEnablementRule\",\n\t\t\t\t\tTarget: authorization.RoleManagementPolicyRuleTarget{\n\t\t\t\t\t\tCaller: \"EndUser\",\n\t\t\t\t\t\tLevel: \"Assignment\",\n\t\t\t\t\t\tOperations: []string{\n\t\t\t\t\t\t\t\"All\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tauthorization.RoleManagementPolicyApprovalRule{\n\t\t\t\t\tId: \"Approval_EndUser_Assignment\",\n\t\t\t\t\tRuleType: \"RoleManagementPolicyApprovalRule\",\n\t\t\t\t\tSetting: authorization.ApprovalSettings{\n\t\t\t\t\t\tApprovalMode: \"SingleStage\",\n\t\t\t\t\t\tApprovalStages: []authorization.ApprovalStage{\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tApprovalStageTimeOutInDays: 1,\n\t\t\t\t\t\t\t\tEscalationTimeInMinutes: 0,\n\t\t\t\t\t\t\t\tIsApproverJustificationRequired: true,\n\t\t\t\t\t\t\t\tIsEscalationEnabled: false,\n\t\t\t\t\t\t\t\tPrimaryApprovers: []authorization.UserSet{\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tDescription: \"amansw_new_group\",\n\t\t\t\t\t\t\t\t\t\tId: \"2385b0f3-5fa9-43cf-8ca4-b01dc97298cd\",\n\t\t\t\t\t\t\t\t\t\tIsBackup: false,\n\t\t\t\t\t\t\t\t\t\tUserType: \"Group\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tDescription: \"amansw_group\",\n\t\t\t\t\t\t\t\t\t\tId: \"2f4913c9-d15b-406a-9946-1d66a28f2690\",\n\t\t\t\t\t\t\t\t\t\tIsBackup: false,\n\t\t\t\t\t\t\t\t\t\tUserType: \"Group\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tIsApprovalRequired: true,\n\t\t\t\t\t\tIsApprovalRequiredForExtension: false,\n\t\t\t\t\t\tIsRequestorJustificationRequired: true,\n\t\t\t\t\t},\n\t\t\t\t\tTarget: authorization.RoleManagementPolicyRuleTarget{\n\t\t\t\t\t\tCaller: \"EndUser\",\n\t\t\t\t\t\tLevel: \"Assignment\",\n\t\t\t\t\t\tOperations: []string{\n\t\t\t\t\t\t\t\"All\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tauthorization.RoleManagementPolicyAuthenticationContextRule{\n\t\t\t\t\tClaimValue: \"\",\n\t\t\t\t\tId: \"AuthenticationContext_EndUser_Assignment\",\n\t\t\t\t\tIsEnabled: false,\n\t\t\t\t\tRuleType: \"RoleManagementPolicyAuthenticationContextRule\",\n\t\t\t\t\tTarget: authorization.RoleManagementPolicyRuleTarget{\n\t\t\t\t\t\tCaller: \"EndUser\",\n\t\t\t\t\t\tLevel: \"Assignment\",\n\t\t\t\t\t\tOperations: []string{\n\t\t\t\t\t\t\t\"All\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tauthorization.RoleManagementPolicyNotificationRule{\n\t\t\t\t\tId: \"Notification_Admin_EndUser_Assignment\",\n\t\t\t\t\tIsDefaultRecipientsEnabled: false,\n\t\t\t\t\tNotificationLevel: \"Critical\",\n\t\t\t\t\tNotificationRecipients: []string{\n\t\t\t\t\t\t\"admin_enduser_member@test.com\",\n\t\t\t\t\t},\n\t\t\t\t\tNotificationType: \"Email\",\n\t\t\t\t\tRecipientType: \"Admin\",\n\t\t\t\t\tRuleType: \"RoleManagementPolicyNotificationRule\",\n\t\t\t\t\tTarget: authorization.RoleManagementPolicyRuleTarget{\n\t\t\t\t\t\tCaller: \"EndUser\",\n\t\t\t\t\t\tLevel: \"Assignment\",\n\t\t\t\t\t\tOperations: []string{\n\t\t\t\t\t\t\t\"All\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tauthorization.RoleManagementPolicyNotificationRule{\n\t\t\t\t\tId: \"Notification_Requestor_EndUser_Assignment\",\n\t\t\t\t\tIsDefaultRecipientsEnabled: false,\n\t\t\t\t\tNotificationLevel: \"Critical\",\n\t\t\t\t\tNotificationRecipients: []string{\n\t\t\t\t\t\t\"requestor_enduser_member@test.com\",\n\t\t\t\t\t},\n\t\t\t\t\tNotificationType: \"Email\",\n\t\t\t\t\tRecipientType: \"Requestor\",\n\t\t\t\t\tRuleType: \"RoleManagementPolicyNotificationRule\",\n\t\t\t\t\tTarget: authorization.RoleManagementPolicyRuleTarget{\n\t\t\t\t\t\tCaller: \"EndUser\",\n\t\t\t\t\t\tLevel: \"Assignment\",\n\t\t\t\t\t\tOperations: []string{\n\t\t\t\t\t\t\t\"All\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tauthorization.RoleManagementPolicyNotificationRule{\n\t\t\t\t\tId: \"Notification_Approver_EndUser_Assignment\",\n\t\t\t\t\tIsDefaultRecipientsEnabled: true,\n\t\t\t\t\tNotificationLevel: \"Critical\",\n\t\t\t\t\tNotificationType: \"Email\",\n\t\t\t\t\tRecipientType: \"Approver\",\n\t\t\t\t\tRuleType: \"RoleManagementPolicyNotificationRule\",\n\t\t\t\t\tTarget: authorization.RoleManagementPolicyRuleTarget{\n\t\t\t\t\t\tCaller: \"EndUser\",\n\t\t\t\t\t\tLevel: \"Assignment\",\n\t\t\t\t\t\tOperations: []string{\n\t\t\t\t\t\t\t\"All\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tScope: pulumi.String(\"providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.authorization.RoleManagementPolicy;\nimport com.pulumi.azurenative.authorization.RoleManagementPolicyArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var roleManagementPolicy = new RoleManagementPolicy(\"roleManagementPolicy\", RoleManagementPolicyArgs.builder() \n .roleManagementPolicyName(\"570c3619-7688-4b34-b290-2b8bb3ccab2a\")\n .rules( \n RoleManagementPolicyExpirationRuleArgs.builder()\n .id(\"Expiration_Admin_Eligibility\")\n .isExpirationRequired(false)\n .maximumDuration(\"P180D\")\n .ruleType(\"RoleManagementPolicyExpirationRule\")\n .target(RoleManagementPolicyRuleTargetArgs.builder()\n .caller(\"Admin\")\n .level(\"Eligibility\")\n .operations(\"All\")\n .build())\n .build(),\n RoleManagementPolicyNotificationRuleArgs.builder()\n .id(\"Notification_Admin_Admin_Eligibility\")\n .isDefaultRecipientsEnabled(false)\n .notificationLevel(\"Critical\")\n .notificationRecipients(\"admin_admin_eligible@test.com\")\n .notificationType(\"Email\")\n .recipientType(\"Admin\")\n .ruleType(\"RoleManagementPolicyNotificationRule\")\n .target(RoleManagementPolicyRuleTargetArgs.builder()\n .caller(\"Admin\")\n .level(\"Eligibility\")\n .operations(\"All\")\n .build())\n .build(),\n RoleManagementPolicyNotificationRuleArgs.builder()\n .id(\"Notification_Requestor_Admin_Eligibility\")\n .isDefaultRecipientsEnabled(false)\n .notificationLevel(\"Critical\")\n .notificationRecipients(\"requestor_admin_eligible@test.com\")\n .notificationType(\"Email\")\n .recipientType(\"Requestor\")\n .ruleType(\"RoleManagementPolicyNotificationRule\")\n .target(RoleManagementPolicyRuleTargetArgs.builder()\n .caller(\"Admin\")\n .level(\"Eligibility\")\n .operations(\"All\")\n .build())\n .build(),\n RoleManagementPolicyNotificationRuleArgs.builder()\n .id(\"Notification_Approver_Admin_Eligibility\")\n .isDefaultRecipientsEnabled(false)\n .notificationLevel(\"Critical\")\n .notificationRecipients(\"approver_admin_eligible@test.com\")\n .notificationType(\"Email\")\n .recipientType(\"Approver\")\n .ruleType(\"RoleManagementPolicyNotificationRule\")\n .target(RoleManagementPolicyRuleTargetArgs.builder()\n .caller(\"Admin\")\n .level(\"Eligibility\")\n .operations(\"All\")\n .build())\n .build(),\n RoleManagementPolicyEnablementRuleArgs.builder()\n .enabledRules()\n .id(\"Enablement_Admin_Eligibility\")\n .ruleType(\"RoleManagementPolicyEnablementRule\")\n .target(RoleManagementPolicyRuleTargetArgs.builder()\n .caller(\"Admin\")\n .level(\"Eligibility\")\n .operations(\"All\")\n .build())\n .build(),\n RoleManagementPolicyExpirationRuleArgs.builder()\n .id(\"Expiration_Admin_Assignment\")\n .isExpirationRequired(false)\n .maximumDuration(\"P90D\")\n .ruleType(\"RoleManagementPolicyExpirationRule\")\n .target(RoleManagementPolicyRuleTargetArgs.builder()\n .caller(\"Admin\")\n .level(\"Assignment\")\n .operations(\"All\")\n .build())\n .build(),\n RoleManagementPolicyEnablementRuleArgs.builder()\n .enabledRules( \n \"Justification\",\n \"MultiFactorAuthentication\")\n .id(\"Enablement_Admin_Assignment\")\n .ruleType(\"RoleManagementPolicyEnablementRule\")\n .target(RoleManagementPolicyRuleTargetArgs.builder()\n .caller(\"Admin\")\n .level(\"Assignment\")\n .operations(\"All\")\n .build())\n .build(),\n RoleManagementPolicyNotificationRuleArgs.builder()\n .id(\"Notification_Admin_Admin_Assignment\")\n .isDefaultRecipientsEnabled(false)\n .notificationLevel(\"Critical\")\n .notificationRecipients(\"admin_admin_member@test.com\")\n .notificationType(\"Email\")\n .recipientType(\"Admin\")\n .ruleType(\"RoleManagementPolicyNotificationRule\")\n .target(RoleManagementPolicyRuleTargetArgs.builder()\n .caller(\"Admin\")\n .level(\"Assignment\")\n .operations(\"All\")\n .build())\n .build(),\n RoleManagementPolicyNotificationRuleArgs.builder()\n .id(\"Notification_Requestor_Admin_Assignment\")\n .isDefaultRecipientsEnabled(false)\n .notificationLevel(\"Critical\")\n .notificationRecipients(\"requestor_admin_member@test.com\")\n .notificationType(\"Email\")\n .recipientType(\"Requestor\")\n .ruleType(\"RoleManagementPolicyNotificationRule\")\n .target(RoleManagementPolicyRuleTargetArgs.builder()\n .caller(\"Admin\")\n .level(\"Assignment\")\n .operations(\"All\")\n .build())\n .build(),\n RoleManagementPolicyNotificationRuleArgs.builder()\n .id(\"Notification_Approver_Admin_Assignment\")\n .isDefaultRecipientsEnabled(false)\n .notificationLevel(\"Critical\")\n .notificationRecipients(\"approver_admin_member@test.com\")\n .notificationType(\"Email\")\n .recipientType(\"Approver\")\n .ruleType(\"RoleManagementPolicyNotificationRule\")\n .target(RoleManagementPolicyRuleTargetArgs.builder()\n .caller(\"Admin\")\n .level(\"Assignment\")\n .operations(\"All\")\n .build())\n .build(),\n RoleManagementPolicyExpirationRuleArgs.builder()\n .id(\"Expiration_EndUser_Assignment\")\n .isExpirationRequired(true)\n .maximumDuration(\"PT7H\")\n .ruleType(\"RoleManagementPolicyExpirationRule\")\n .target(RoleManagementPolicyRuleTargetArgs.builder()\n .caller(\"EndUser\")\n .level(\"Assignment\")\n .operations(\"All\")\n .build())\n .build(),\n RoleManagementPolicyEnablementRuleArgs.builder()\n .enabledRules( \n \"Justification\",\n \"MultiFactorAuthentication\",\n \"Ticketing\")\n .id(\"Enablement_EndUser_Assignment\")\n .ruleType(\"RoleManagementPolicyEnablementRule\")\n .target(RoleManagementPolicyRuleTargetArgs.builder()\n .caller(\"EndUser\")\n .level(\"Assignment\")\n .operations(\"All\")\n .build())\n .build(),\n RoleManagementPolicyApprovalRuleArgs.builder()\n .id(\"Approval_EndUser_Assignment\")\n .ruleType(\"RoleManagementPolicyApprovalRule\")\n .setting(ApprovalSettingsArgs.builder()\n .approvalMode(\"SingleStage\")\n .approvalStages(ApprovalStageArgs.builder()\n .approvalStageTimeOutInDays(1)\n .escalationTimeInMinutes(0)\n .isApproverJustificationRequired(true)\n .isEscalationEnabled(false)\n .primaryApprovers( \n UserSetArgs.builder()\n .description(\"amansw_new_group\")\n .id(\"2385b0f3-5fa9-43cf-8ca4-b01dc97298cd\")\n .isBackup(false)\n .userType(\"Group\")\n .build(),\n UserSetArgs.builder()\n .description(\"amansw_group\")\n .id(\"2f4913c9-d15b-406a-9946-1d66a28f2690\")\n .isBackup(false)\n .userType(\"Group\")\n .build())\n .build())\n .isApprovalRequired(true)\n .isApprovalRequiredForExtension(false)\n .isRequestorJustificationRequired(true)\n .build())\n .target(RoleManagementPolicyRuleTargetArgs.builder()\n .caller(\"EndUser\")\n .level(\"Assignment\")\n .operations(\"All\")\n .build())\n .build(),\n RoleManagementPolicyAuthenticationContextRuleArgs.builder()\n .claimValue(\"\")\n .id(\"AuthenticationContext_EndUser_Assignment\")\n .isEnabled(false)\n .ruleType(\"RoleManagementPolicyAuthenticationContextRule\")\n .target(RoleManagementPolicyRuleTargetArgs.builder()\n .caller(\"EndUser\")\n .level(\"Assignment\")\n .operations(\"All\")\n .build())\n .build(),\n RoleManagementPolicyNotificationRuleArgs.builder()\n .id(\"Notification_Admin_EndUser_Assignment\")\n .isDefaultRecipientsEnabled(false)\n .notificationLevel(\"Critical\")\n .notificationRecipients(\"admin_enduser_member@test.com\")\n .notificationType(\"Email\")\n .recipientType(\"Admin\")\n .ruleType(\"RoleManagementPolicyNotificationRule\")\n .target(RoleManagementPolicyRuleTargetArgs.builder()\n .caller(\"EndUser\")\n .level(\"Assignment\")\n .operations(\"All\")\n .build())\n .build(),\n RoleManagementPolicyNotificationRuleArgs.builder()\n .id(\"Notification_Requestor_EndUser_Assignment\")\n .isDefaultRecipientsEnabled(false)\n .notificationLevel(\"Critical\")\n .notificationRecipients(\"requestor_enduser_member@test.com\")\n .notificationType(\"Email\")\n .recipientType(\"Requestor\")\n .ruleType(\"RoleManagementPolicyNotificationRule\")\n .target(RoleManagementPolicyRuleTargetArgs.builder()\n .caller(\"EndUser\")\n .level(\"Assignment\")\n .operations(\"All\")\n .build())\n .build(),\n RoleManagementPolicyNotificationRuleArgs.builder()\n .id(\"Notification_Approver_EndUser_Assignment\")\n .isDefaultRecipientsEnabled(true)\n .notificationLevel(\"Critical\")\n .notificationType(\"Email\")\n .recipientType(\"Approver\")\n .ruleType(\"RoleManagementPolicyNotificationRule\")\n .target(RoleManagementPolicyRuleTargetArgs.builder()\n .caller(\"EndUser\")\n .level(\"Assignment\")\n .operations(\"All\")\n .build())\n .build())\n .scope(\"providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst roleManagementPolicy = new azure_native.authorization.RoleManagementPolicy(\"roleManagementPolicy\", {\n roleManagementPolicyName: \"570c3619-7688-4b34-b290-2b8bb3ccab2a\",\n rules: [\n {\n id: \"Expiration_Admin_Eligibility\",\n isExpirationRequired: false,\n maximumDuration: \"P180D\",\n ruleType: \"RoleManagementPolicyExpirationRule\",\n target: {\n caller: \"Admin\",\n level: \"Eligibility\",\n operations: [\"All\"],\n },\n },\n {\n id: \"Notification_Admin_Admin_Eligibility\",\n isDefaultRecipientsEnabled: false,\n notificationLevel: \"Critical\",\n notificationRecipients: [\"admin_admin_eligible@test.com\"],\n notificationType: \"Email\",\n recipientType: \"Admin\",\n ruleType: \"RoleManagementPolicyNotificationRule\",\n target: {\n caller: \"Admin\",\n level: \"Eligibility\",\n operations: [\"All\"],\n },\n },\n {\n id: \"Notification_Requestor_Admin_Eligibility\",\n isDefaultRecipientsEnabled: false,\n notificationLevel: \"Critical\",\n notificationRecipients: [\"requestor_admin_eligible@test.com\"],\n notificationType: \"Email\",\n recipientType: \"Requestor\",\n ruleType: \"RoleManagementPolicyNotificationRule\",\n target: {\n caller: \"Admin\",\n level: \"Eligibility\",\n operations: [\"All\"],\n },\n },\n {\n id: \"Notification_Approver_Admin_Eligibility\",\n isDefaultRecipientsEnabled: false,\n notificationLevel: \"Critical\",\n notificationRecipients: [\"approver_admin_eligible@test.com\"],\n notificationType: \"Email\",\n recipientType: \"Approver\",\n ruleType: \"RoleManagementPolicyNotificationRule\",\n target: {\n caller: \"Admin\",\n level: \"Eligibility\",\n operations: [\"All\"],\n },\n },\n {\n enabledRules: [],\n id: \"Enablement_Admin_Eligibility\",\n ruleType: \"RoleManagementPolicyEnablementRule\",\n target: {\n caller: \"Admin\",\n level: \"Eligibility\",\n operations: [\"All\"],\n },\n },\n {\n id: \"Expiration_Admin_Assignment\",\n isExpirationRequired: false,\n maximumDuration: \"P90D\",\n ruleType: \"RoleManagementPolicyExpirationRule\",\n target: {\n caller: \"Admin\",\n level: \"Assignment\",\n operations: [\"All\"],\n },\n },\n {\n enabledRules: [\n \"Justification\",\n \"MultiFactorAuthentication\",\n ],\n id: \"Enablement_Admin_Assignment\",\n ruleType: \"RoleManagementPolicyEnablementRule\",\n target: {\n caller: \"Admin\",\n level: \"Assignment\",\n operations: [\"All\"],\n },\n },\n {\n id: \"Notification_Admin_Admin_Assignment\",\n isDefaultRecipientsEnabled: false,\n notificationLevel: \"Critical\",\n notificationRecipients: [\"admin_admin_member@test.com\"],\n notificationType: \"Email\",\n recipientType: \"Admin\",\n ruleType: \"RoleManagementPolicyNotificationRule\",\n target: {\n caller: \"Admin\",\n level: \"Assignment\",\n operations: [\"All\"],\n },\n },\n {\n id: \"Notification_Requestor_Admin_Assignment\",\n isDefaultRecipientsEnabled: false,\n notificationLevel: \"Critical\",\n notificationRecipients: [\"requestor_admin_member@test.com\"],\n notificationType: \"Email\",\n recipientType: \"Requestor\",\n ruleType: \"RoleManagementPolicyNotificationRule\",\n target: {\n caller: \"Admin\",\n level: \"Assignment\",\n operations: [\"All\"],\n },\n },\n {\n id: \"Notification_Approver_Admin_Assignment\",\n isDefaultRecipientsEnabled: false,\n notificationLevel: \"Critical\",\n notificationRecipients: [\"approver_admin_member@test.com\"],\n notificationType: \"Email\",\n recipientType: \"Approver\",\n ruleType: \"RoleManagementPolicyNotificationRule\",\n target: {\n caller: \"Admin\",\n level: \"Assignment\",\n operations: [\"All\"],\n },\n },\n {\n id: \"Expiration_EndUser_Assignment\",\n isExpirationRequired: true,\n maximumDuration: \"PT7H\",\n ruleType: \"RoleManagementPolicyExpirationRule\",\n target: {\n caller: \"EndUser\",\n level: \"Assignment\",\n operations: [\"All\"],\n },\n },\n {\n enabledRules: [\n \"Justification\",\n \"MultiFactorAuthentication\",\n \"Ticketing\",\n ],\n id: \"Enablement_EndUser_Assignment\",\n ruleType: \"RoleManagementPolicyEnablementRule\",\n target: {\n caller: \"EndUser\",\n level: \"Assignment\",\n operations: [\"All\"],\n },\n },\n {\n id: \"Approval_EndUser_Assignment\",\n ruleType: \"RoleManagementPolicyApprovalRule\",\n setting: {\n approvalMode: \"SingleStage\",\n approvalStages: [{\n approvalStageTimeOutInDays: 1,\n escalationTimeInMinutes: 0,\n isApproverJustificationRequired: true,\n isEscalationEnabled: false,\n primaryApprovers: [\n {\n description: \"amansw_new_group\",\n id: \"2385b0f3-5fa9-43cf-8ca4-b01dc97298cd\",\n isBackup: false,\n userType: \"Group\",\n },\n {\n description: \"amansw_group\",\n id: \"2f4913c9-d15b-406a-9946-1d66a28f2690\",\n isBackup: false,\n userType: \"Group\",\n },\n ],\n }],\n isApprovalRequired: true,\n isApprovalRequiredForExtension: false,\n isRequestorJustificationRequired: true,\n },\n target: {\n caller: \"EndUser\",\n level: \"Assignment\",\n operations: [\"All\"],\n },\n },\n {\n claimValue: \"\",\n id: \"AuthenticationContext_EndUser_Assignment\",\n isEnabled: false,\n ruleType: \"RoleManagementPolicyAuthenticationContextRule\",\n target: {\n caller: \"EndUser\",\n level: \"Assignment\",\n operations: [\"All\"],\n },\n },\n {\n id: \"Notification_Admin_EndUser_Assignment\",\n isDefaultRecipientsEnabled: false,\n notificationLevel: \"Critical\",\n notificationRecipients: [\"admin_enduser_member@test.com\"],\n notificationType: \"Email\",\n recipientType: \"Admin\",\n ruleType: \"RoleManagementPolicyNotificationRule\",\n target: {\n caller: \"EndUser\",\n level: \"Assignment\",\n operations: [\"All\"],\n },\n },\n {\n id: \"Notification_Requestor_EndUser_Assignment\",\n isDefaultRecipientsEnabled: false,\n notificationLevel: \"Critical\",\n notificationRecipients: [\"requestor_enduser_member@test.com\"],\n notificationType: \"Email\",\n recipientType: \"Requestor\",\n ruleType: \"RoleManagementPolicyNotificationRule\",\n target: {\n caller: \"EndUser\",\n level: \"Assignment\",\n operations: [\"All\"],\n },\n },\n {\n id: \"Notification_Approver_EndUser_Assignment\",\n isDefaultRecipientsEnabled: true,\n notificationLevel: \"Critical\",\n notificationType: \"Email\",\n recipientType: \"Approver\",\n ruleType: \"RoleManagementPolicyNotificationRule\",\n target: {\n caller: \"EndUser\",\n level: \"Assignment\",\n operations: [\"All\"],\n },\n },\n ],\n scope: \"providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nrole_management_policy = azure_native.authorization.RoleManagementPolicy(\"roleManagementPolicy\",\n role_management_policy_name=\"570c3619-7688-4b34-b290-2b8bb3ccab2a\",\n rules=[\n azure_native.authorization.RoleManagementPolicyExpirationRuleArgs(\n id=\"Expiration_Admin_Eligibility\",\n is_expiration_required=False,\n maximum_duration=\"P180D\",\n rule_type=\"RoleManagementPolicyExpirationRule\",\n target=azure_native.authorization.RoleManagementPolicyRuleTargetArgs(\n caller=\"Admin\",\n level=\"Eligibility\",\n operations=[\"All\"],\n ),\n ),\n azure_native.authorization.RoleManagementPolicyNotificationRuleArgs(\n id=\"Notification_Admin_Admin_Eligibility\",\n is_default_recipients_enabled=False,\n notification_level=\"Critical\",\n notification_recipients=[\"admin_admin_eligible@test.com\"],\n notification_type=\"Email\",\n recipient_type=\"Admin\",\n rule_type=\"RoleManagementPolicyNotificationRule\",\n target=azure_native.authorization.RoleManagementPolicyRuleTargetArgs(\n caller=\"Admin\",\n level=\"Eligibility\",\n operations=[\"All\"],\n ),\n ),\n azure_native.authorization.RoleManagementPolicyNotificationRuleArgs(\n id=\"Notification_Requestor_Admin_Eligibility\",\n is_default_recipients_enabled=False,\n notification_level=\"Critical\",\n notification_recipients=[\"requestor_admin_eligible@test.com\"],\n notification_type=\"Email\",\n recipient_type=\"Requestor\",\n rule_type=\"RoleManagementPolicyNotificationRule\",\n target=azure_native.authorization.RoleManagementPolicyRuleTargetArgs(\n caller=\"Admin\",\n level=\"Eligibility\",\n operations=[\"All\"],\n ),\n ),\n azure_native.authorization.RoleManagementPolicyNotificationRuleArgs(\n id=\"Notification_Approver_Admin_Eligibility\",\n is_default_recipients_enabled=False,\n notification_level=\"Critical\",\n notification_recipients=[\"approver_admin_eligible@test.com\"],\n notification_type=\"Email\",\n recipient_type=\"Approver\",\n rule_type=\"RoleManagementPolicyNotificationRule\",\n target=azure_native.authorization.RoleManagementPolicyRuleTargetArgs(\n caller=\"Admin\",\n level=\"Eligibility\",\n operations=[\"All\"],\n ),\n ),\n azure_native.authorization.RoleManagementPolicyEnablementRuleArgs(\n enabled_rules=[],\n id=\"Enablement_Admin_Eligibility\",\n rule_type=\"RoleManagementPolicyEnablementRule\",\n target=azure_native.authorization.RoleManagementPolicyRuleTargetArgs(\n caller=\"Admin\",\n level=\"Eligibility\",\n operations=[\"All\"],\n ),\n ),\n azure_native.authorization.RoleManagementPolicyExpirationRuleArgs(\n id=\"Expiration_Admin_Assignment\",\n is_expiration_required=False,\n maximum_duration=\"P90D\",\n rule_type=\"RoleManagementPolicyExpirationRule\",\n target=azure_native.authorization.RoleManagementPolicyRuleTargetArgs(\n caller=\"Admin\",\n level=\"Assignment\",\n operations=[\"All\"],\n ),\n ),\n azure_native.authorization.RoleManagementPolicyEnablementRuleArgs(\n enabled_rules=[\n \"Justification\",\n \"MultiFactorAuthentication\",\n ],\n id=\"Enablement_Admin_Assignment\",\n rule_type=\"RoleManagementPolicyEnablementRule\",\n target=azure_native.authorization.RoleManagementPolicyRuleTargetArgs(\n caller=\"Admin\",\n level=\"Assignment\",\n operations=[\"All\"],\n ),\n ),\n azure_native.authorization.RoleManagementPolicyNotificationRuleArgs(\n id=\"Notification_Admin_Admin_Assignment\",\n is_default_recipients_enabled=False,\n notification_level=\"Critical\",\n notification_recipients=[\"admin_admin_member@test.com\"],\n notification_type=\"Email\",\n recipient_type=\"Admin\",\n rule_type=\"RoleManagementPolicyNotificationRule\",\n target=azure_native.authorization.RoleManagementPolicyRuleTargetArgs(\n caller=\"Admin\",\n level=\"Assignment\",\n operations=[\"All\"],\n ),\n ),\n azure_native.authorization.RoleManagementPolicyNotificationRuleArgs(\n id=\"Notification_Requestor_Admin_Assignment\",\n is_default_recipients_enabled=False,\n notification_level=\"Critical\",\n notification_recipients=[\"requestor_admin_member@test.com\"],\n notification_type=\"Email\",\n recipient_type=\"Requestor\",\n rule_type=\"RoleManagementPolicyNotificationRule\",\n target=azure_native.authorization.RoleManagementPolicyRuleTargetArgs(\n caller=\"Admin\",\n level=\"Assignment\",\n operations=[\"All\"],\n ),\n ),\n azure_native.authorization.RoleManagementPolicyNotificationRuleArgs(\n id=\"Notification_Approver_Admin_Assignment\",\n is_default_recipients_enabled=False,\n notification_level=\"Critical\",\n notification_recipients=[\"approver_admin_member@test.com\"],\n notification_type=\"Email\",\n recipient_type=\"Approver\",\n rule_type=\"RoleManagementPolicyNotificationRule\",\n target=azure_native.authorization.RoleManagementPolicyRuleTargetArgs(\n caller=\"Admin\",\n level=\"Assignment\",\n operations=[\"All\"],\n ),\n ),\n azure_native.authorization.RoleManagementPolicyExpirationRuleArgs(\n id=\"Expiration_EndUser_Assignment\",\n is_expiration_required=True,\n maximum_duration=\"PT7H\",\n rule_type=\"RoleManagementPolicyExpirationRule\",\n target=azure_native.authorization.RoleManagementPolicyRuleTargetArgs(\n caller=\"EndUser\",\n level=\"Assignment\",\n operations=[\"All\"],\n ),\n ),\n azure_native.authorization.RoleManagementPolicyEnablementRuleArgs(\n enabled_rules=[\n \"Justification\",\n \"MultiFactorAuthentication\",\n \"Ticketing\",\n ],\n id=\"Enablement_EndUser_Assignment\",\n rule_type=\"RoleManagementPolicyEnablementRule\",\n target=azure_native.authorization.RoleManagementPolicyRuleTargetArgs(\n caller=\"EndUser\",\n level=\"Assignment\",\n operations=[\"All\"],\n ),\n ),\n azure_native.authorization.RoleManagementPolicyApprovalRuleArgs(\n id=\"Approval_EndUser_Assignment\",\n rule_type=\"RoleManagementPolicyApprovalRule\",\n setting=azure_native.authorization.ApprovalSettingsArgs(\n approval_mode=\"SingleStage\",\n approval_stages=[azure_native.authorization.ApprovalStageArgs(\n approval_stage_time_out_in_days=1,\n escalation_time_in_minutes=0,\n is_approver_justification_required=True,\n is_escalation_enabled=False,\n primary_approvers=[\n azure_native.authorization.UserSetArgs(\n description=\"amansw_new_group\",\n id=\"2385b0f3-5fa9-43cf-8ca4-b01dc97298cd\",\n is_backup=False,\n user_type=\"Group\",\n ),\n azure_native.authorization.UserSetArgs(\n description=\"amansw_group\",\n id=\"2f4913c9-d15b-406a-9946-1d66a28f2690\",\n is_backup=False,\n user_type=\"Group\",\n ),\n ],\n )],\n is_approval_required=True,\n is_approval_required_for_extension=False,\n is_requestor_justification_required=True,\n ),\n target=azure_native.authorization.RoleManagementPolicyRuleTargetArgs(\n caller=\"EndUser\",\n level=\"Assignment\",\n operations=[\"All\"],\n ),\n ),\n azure_native.authorization.RoleManagementPolicyAuthenticationContextRuleArgs(\n claim_value=\"\",\n id=\"AuthenticationContext_EndUser_Assignment\",\n is_enabled=False,\n rule_type=\"RoleManagementPolicyAuthenticationContextRule\",\n target=azure_native.authorization.RoleManagementPolicyRuleTargetArgs(\n caller=\"EndUser\",\n level=\"Assignment\",\n operations=[\"All\"],\n ),\n ),\n azure_native.authorization.RoleManagementPolicyNotificationRuleArgs(\n id=\"Notification_Admin_EndUser_Assignment\",\n is_default_recipients_enabled=False,\n notification_level=\"Critical\",\n notification_recipients=[\"admin_enduser_member@test.com\"],\n notification_type=\"Email\",\n recipient_type=\"Admin\",\n rule_type=\"RoleManagementPolicyNotificationRule\",\n target=azure_native.authorization.RoleManagementPolicyRuleTargetArgs(\n caller=\"EndUser\",\n level=\"Assignment\",\n operations=[\"All\"],\n ),\n ),\n azure_native.authorization.RoleManagementPolicyNotificationRuleArgs(\n id=\"Notification_Requestor_EndUser_Assignment\",\n is_default_recipients_enabled=False,\n notification_level=\"Critical\",\n notification_recipients=[\"requestor_enduser_member@test.com\"],\n notification_type=\"Email\",\n recipient_type=\"Requestor\",\n rule_type=\"RoleManagementPolicyNotificationRule\",\n target=azure_native.authorization.RoleManagementPolicyRuleTargetArgs(\n caller=\"EndUser\",\n level=\"Assignment\",\n operations=[\"All\"],\n ),\n ),\n azure_native.authorization.RoleManagementPolicyNotificationRuleArgs(\n id=\"Notification_Approver_EndUser_Assignment\",\n is_default_recipients_enabled=True,\n notification_level=\"Critical\",\n notification_type=\"Email\",\n recipient_type=\"Approver\",\n rule_type=\"RoleManagementPolicyNotificationRule\",\n target=azure_native.authorization.RoleManagementPolicyRuleTargetArgs(\n caller=\"EndUser\",\n level=\"Assignment\",\n operations=[\"All\"],\n ),\n ),\n ],\n scope=\"providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368\")\n\n```\n\n```yaml\nresources:\n roleManagementPolicy:\n type: azure-native:authorization:RoleManagementPolicy\n properties:\n roleManagementPolicyName: 570c3619-7688-4b34-b290-2b8bb3ccab2a\n rules:\n - id: Expiration_Admin_Eligibility\n isExpirationRequired: false\n maximumDuration: P180D\n ruleType: RoleManagementPolicyExpirationRule\n target:\n caller: Admin\n level: Eligibility\n operations:\n - All\n - id: Notification_Admin_Admin_Eligibility\n isDefaultRecipientsEnabled: false\n notificationLevel: Critical\n notificationRecipients:\n - admin_admin_eligible@test.com\n notificationType: Email\n recipientType: Admin\n ruleType: RoleManagementPolicyNotificationRule\n target:\n caller: Admin\n level: Eligibility\n operations:\n - All\n - id: Notification_Requestor_Admin_Eligibility\n isDefaultRecipientsEnabled: false\n notificationLevel: Critical\n notificationRecipients:\n - requestor_admin_eligible@test.com\n notificationType: Email\n recipientType: Requestor\n ruleType: RoleManagementPolicyNotificationRule\n target:\n caller: Admin\n level: Eligibility\n operations:\n - All\n - id: Notification_Approver_Admin_Eligibility\n isDefaultRecipientsEnabled: false\n notificationLevel: Critical\n notificationRecipients:\n - approver_admin_eligible@test.com\n notificationType: Email\n recipientType: Approver\n ruleType: RoleManagementPolicyNotificationRule\n target:\n caller: Admin\n level: Eligibility\n operations:\n - All\n - enabledRules: []\n id: Enablement_Admin_Eligibility\n ruleType: RoleManagementPolicyEnablementRule\n target:\n caller: Admin\n level: Eligibility\n operations:\n - All\n - id: Expiration_Admin_Assignment\n isExpirationRequired: false\n maximumDuration: P90D\n ruleType: RoleManagementPolicyExpirationRule\n target:\n caller: Admin\n level: Assignment\n operations:\n - All\n - enabledRules:\n - Justification\n - MultiFactorAuthentication\n id: Enablement_Admin_Assignment\n ruleType: RoleManagementPolicyEnablementRule\n target:\n caller: Admin\n level: Assignment\n operations:\n - All\n - id: Notification_Admin_Admin_Assignment\n isDefaultRecipientsEnabled: false\n notificationLevel: Critical\n notificationRecipients:\n - admin_admin_member@test.com\n notificationType: Email\n recipientType: Admin\n ruleType: RoleManagementPolicyNotificationRule\n target:\n caller: Admin\n level: Assignment\n operations:\n - All\n - id: Notification_Requestor_Admin_Assignment\n isDefaultRecipientsEnabled: false\n notificationLevel: Critical\n notificationRecipients:\n - requestor_admin_member@test.com\n notificationType: Email\n recipientType: Requestor\n ruleType: RoleManagementPolicyNotificationRule\n target:\n caller: Admin\n level: Assignment\n operations:\n - All\n - id: Notification_Approver_Admin_Assignment\n isDefaultRecipientsEnabled: false\n notificationLevel: Critical\n notificationRecipients:\n - approver_admin_member@test.com\n notificationType: Email\n recipientType: Approver\n ruleType: RoleManagementPolicyNotificationRule\n target:\n caller: Admin\n level: Assignment\n operations:\n - All\n - id: Expiration_EndUser_Assignment\n isExpirationRequired: true\n maximumDuration: PT7H\n ruleType: RoleManagementPolicyExpirationRule\n target:\n caller: EndUser\n level: Assignment\n operations:\n - All\n - enabledRules:\n - Justification\n - MultiFactorAuthentication\n - Ticketing\n id: Enablement_EndUser_Assignment\n ruleType: RoleManagementPolicyEnablementRule\n target:\n caller: EndUser\n level: Assignment\n operations:\n - All\n - id: Approval_EndUser_Assignment\n ruleType: RoleManagementPolicyApprovalRule\n setting:\n approvalMode: SingleStage\n approvalStages:\n - approvalStageTimeOutInDays: 1\n escalationTimeInMinutes: 0\n isApproverJustificationRequired: true\n isEscalationEnabled: false\n primaryApprovers:\n - description: amansw_new_group\n id: 2385b0f3-5fa9-43cf-8ca4-b01dc97298cd\n isBackup: false\n userType: Group\n - description: amansw_group\n id: 2f4913c9-d15b-406a-9946-1d66a28f2690\n isBackup: false\n userType: Group\n isApprovalRequired: true\n isApprovalRequiredForExtension: false\n isRequestorJustificationRequired: true\n target:\n caller: EndUser\n level: Assignment\n operations:\n - All\n - claimValue:\n id: AuthenticationContext_EndUser_Assignment\n isEnabled: false\n ruleType: RoleManagementPolicyAuthenticationContextRule\n target:\n caller: EndUser\n level: Assignment\n operations:\n - All\n - id: Notification_Admin_EndUser_Assignment\n isDefaultRecipientsEnabled: false\n notificationLevel: Critical\n notificationRecipients:\n - admin_enduser_member@test.com\n notificationType: Email\n recipientType: Admin\n ruleType: RoleManagementPolicyNotificationRule\n target:\n caller: EndUser\n level: Assignment\n operations:\n - All\n - id: Notification_Requestor_EndUser_Assignment\n isDefaultRecipientsEnabled: false\n notificationLevel: Critical\n notificationRecipients:\n - requestor_enduser_member@test.com\n notificationType: Email\n recipientType: Requestor\n ruleType: RoleManagementPolicyNotificationRule\n target:\n caller: EndUser\n level: Assignment\n operations:\n - All\n - id: Notification_Approver_EndUser_Assignment\n isDefaultRecipientsEnabled: true\n notificationLevel: Critical\n notificationType: Email\n recipientType: Approver\n ruleType: RoleManagementPolicyNotificationRule\n target:\n caller: EndUser\n level: Assignment\n operations:\n - All\n scope: providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368\n\n```\n\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nAn existing resource can be imported using its type token, name, and identifier, e.g.\n\n```sh\n$ pulumi import azure-native:authorization:RoleManagementPolicy 570c3619-7688-4b34-b290-2b8bb3ccab2a /{scope}/providers/Microsoft.Authorization/roleManagementPolicies/{roleManagementPolicyName} \n```\n", + "properties": { + "description": { + "type": "string", + "description": "The role management policy description." + }, + "displayName": { + "type": "string", + "description": "The role management policy display name." + }, + "effectiveRules": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyApprovalRuleResponse" + }, + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyAuthenticationContextRuleResponse" + }, + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyEnablementRuleResponse" + }, + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyExpirationRuleResponse" + }, + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyNotificationRuleResponse" + } + ], + "discriminator": { + "propertyName": "ruleType", + "mapping": { + "RoleManagementPolicyApprovalRule": "#/types/azure-native:authorization:RoleManagementPolicyApprovalRuleResponse", + "RoleManagementPolicyAuthenticationContextRule": "#/types/azure-native:authorization:RoleManagementPolicyAuthenticationContextRuleResponse", + "RoleManagementPolicyEnablementRule": "#/types/azure-native:authorization:RoleManagementPolicyEnablementRuleResponse", + "RoleManagementPolicyExpirationRule": "#/types/azure-native:authorization:RoleManagementPolicyExpirationRuleResponse", + "RoleManagementPolicyNotificationRule": "#/types/azure-native:authorization:RoleManagementPolicyNotificationRuleResponse" + } + } + }, + "description": "The readonly computed rule applied to the policy." + }, + "isOrganizationDefault": { + "type": "boolean", + "description": "The role management policy is default policy." + }, + "lastModifiedBy": { + "type": "object", + "$ref": "#/types/azure-native:authorization:PrincipalResponse", + "description": "The name of the entity last modified it" + }, + "lastModifiedDateTime": { + "type": "string", + "description": "The last modified date time." + }, + "name": { + "type": "string", + "description": "The role management policy name." + }, + "policyProperties": { + "type": "object", + "$ref": "#/types/azure-native:authorization:PolicyPropertiesResponse", + "description": "Additional properties of scope" + }, + "rules": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyApprovalRuleResponse" + }, + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyAuthenticationContextRuleResponse" + }, + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyEnablementRuleResponse" + }, + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyExpirationRuleResponse" + }, + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyNotificationRuleResponse" + } + ], + "discriminator": { + "propertyName": "ruleType", + "mapping": { + "RoleManagementPolicyApprovalRule": "#/types/azure-native:authorization:RoleManagementPolicyApprovalRuleResponse", + "RoleManagementPolicyAuthenticationContextRule": "#/types/azure-native:authorization:RoleManagementPolicyAuthenticationContextRuleResponse", + "RoleManagementPolicyEnablementRule": "#/types/azure-native:authorization:RoleManagementPolicyEnablementRuleResponse", + "RoleManagementPolicyExpirationRule": "#/types/azure-native:authorization:RoleManagementPolicyExpirationRuleResponse", + "RoleManagementPolicyNotificationRule": "#/types/azure-native:authorization:RoleManagementPolicyNotificationRuleResponse" + } + } + }, + "description": "The rule applied to the policy." + }, + "scope": { + "type": "string", + "description": "The role management policy scope." + }, + "type": { + "type": "string", + "description": "The role management policy type." + } + }, + "type": "object", + "required": [ + "effectiveRules", + "lastModifiedBy", + "lastModifiedDateTime", + "name", + "policyProperties", + "type" + ], + "inputProperties": { + "description": { + "type": "string", + "description": "The role management policy description." + }, + "displayName": { + "type": "string", + "description": "The role management policy display name." + }, + "isOrganizationDefault": { + "type": "boolean", + "description": "The role management policy is default policy." + }, + "roleManagementPolicyName": { + "type": "string", + "description": "The name (guid) of the role management policy to upsert.", + "willReplaceOnChanges": true + }, + "rules": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyApprovalRule" + }, + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyAuthenticationContextRule" + }, + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyEnablementRule" + }, + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyExpirationRule" + }, + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyNotificationRule" + } + ], + "discriminator": { + "propertyName": "ruleType", + "mapping": { + "RoleManagementPolicyApprovalRule": "#/types/azure-native:authorization:RoleManagementPolicyApprovalRule", + "RoleManagementPolicyAuthenticationContextRule": "#/types/azure-native:authorization:RoleManagementPolicyAuthenticationContextRule", + "RoleManagementPolicyEnablementRule": "#/types/azure-native:authorization:RoleManagementPolicyEnablementRule", + "RoleManagementPolicyExpirationRule": "#/types/azure-native:authorization:RoleManagementPolicyExpirationRule", + "RoleManagementPolicyNotificationRule": "#/types/azure-native:authorization:RoleManagementPolicyNotificationRule" + } + } + }, + "description": "The rule applied to the policy." + }, + "scope": { + "type": "string", + "description": "The role management policy scope." + } + }, + "requiredInputs": [ + "scope" + ], + "aliases": [ + { + "type": "azure-native:authorization/v20201001:RoleManagementPolicy" + }, + { + "type": "azure-native:authorization/v20201001preview:RoleManagementPolicy" + } + ] + }, "azure-native:authorization:RoleManagementPolicyAssignment": { "description": "Role management policy\nAzure REST API version: 2020-10-01. Prior API version in Azure Native 1.x: 2020-10-01.\n\nOther available API versions: 2020-10-01-preview.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n### PutRoleManagementPolicyAssignment\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var roleManagementPolicyAssignment = new AzureNative.Authorization.RoleManagementPolicyAssignment(\"roleManagementPolicyAssignment\", new()\n {\n PolicyId = \"/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9\",\n RoleDefinitionId = \"/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24\",\n RoleManagementPolicyAssignmentName = \"b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24\",\n Scope = \"providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/authorization/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := authorization.NewRoleManagementPolicyAssignment(ctx, \"roleManagementPolicyAssignment\", \u0026authorization.RoleManagementPolicyAssignmentArgs{\n\t\t\tPolicyId: pulumi.String(\"/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9\"),\n\t\t\tRoleDefinitionId: pulumi.String(\"/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24\"),\n\t\t\tRoleManagementPolicyAssignmentName: pulumi.String(\"b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24\"),\n\t\t\tScope: pulumi.String(\"providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.authorization.RoleManagementPolicyAssignment;\nimport com.pulumi.azurenative.authorization.RoleManagementPolicyAssignmentArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var roleManagementPolicyAssignment = new RoleManagementPolicyAssignment(\"roleManagementPolicyAssignment\", RoleManagementPolicyAssignmentArgs.builder() \n .policyId(\"/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9\")\n .roleDefinitionId(\"/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24\")\n .roleManagementPolicyAssignmentName(\"b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24\")\n .scope(\"providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst roleManagementPolicyAssignment = new azure_native.authorization.RoleManagementPolicyAssignment(\"roleManagementPolicyAssignment\", {\n policyId: \"/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9\",\n roleDefinitionId: \"/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24\",\n roleManagementPolicyAssignmentName: \"b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24\",\n scope: \"providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nrole_management_policy_assignment = azure_native.authorization.RoleManagementPolicyAssignment(\"roleManagementPolicyAssignment\",\n policy_id=\"/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9\",\n role_definition_id=\"/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24\",\n role_management_policy_assignment_name=\"b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24\",\n scope=\"providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368\")\n\n```\n\n```yaml\nresources:\n roleManagementPolicyAssignment:\n type: azure-native:authorization:RoleManagementPolicyAssignment\n properties:\n policyId: /subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9\n roleDefinitionId: /subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24\n roleManagementPolicyAssignmentName: b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24\n scope: providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368\n\n```\n\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nAn existing resource can be imported using its type token, name, and identifier, e.g.\n\n```sh\n$ pulumi import azure-native:authorization:RoleManagementPolicyAssignment b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24 /{scope}/providers/Microsoft.Authorization/roleManagementPolicyAssignments/{roleManagementPolicyAssignmentName} \n```\n", "properties": { @@ -482449,7 +483126,7 @@ ] }, "azure-native:azurestackhci:UpdateRun": { - "description": "Details of an Update run\nAzure REST API version: 2023-03-01.\n\nOther available API versions: 2022-12-15-preview, 2023-06-01, 2023-08-01, 2023-08-01-preview, 2023-11-01-preview, 2024-01-01.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n### Get Update runs under cluster resource\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var updateRun = new AzureNative.AzureStackHCI.UpdateRun(\"updateRun\", new()\n {\n ClusterName = \"testcluster\",\n Description = \"Update Azure Stack.\",\n EndTimeUtc = \"2022-04-06T13:58:42.969006+00:00\",\n ErrorMessage = \"\",\n LastUpdatedTimeUtc = \"2022-04-06T13:58:42.969006+00:00\",\n Name = \"Unnamed step\",\n ResourceGroupName = \"testrg\",\n StartTimeUtc = \"2022-04-06T01:36:33.3876751+00:00\",\n Status = \"Success\",\n Steps = new[]\n {\n new AzureNative.AzureStackHCI.Inputs.StepArgs\n {\n Description = \"Prepare for SSU update\",\n EndTimeUtc = \"2022-04-06T01:37:16.8728314+00:00\",\n ErrorMessage = \"\",\n LastUpdatedTimeUtc = \"2022-04-06T01:37:16.8728314+00:00\",\n Name = \"PreUpdate Cloud\",\n StartTimeUtc = \"2022-04-06T01:36:33.3876751+00:00\",\n Status = \"Success\",\n Steps = new() { },\n },\n },\n UpdateName = \"Microsoft4.2203.2.32\",\n UpdateRunName = \"23b779ba-0d52-4a80-8571-45ca74664ec3\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/azurestackhci/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := azurestackhci.NewUpdateRun(ctx, \"updateRun\", \u0026azurestackhci.UpdateRunArgs{\n\t\t\tClusterName: pulumi.String(\"testcluster\"),\n\t\t\tDescription: pulumi.String(\"Update Azure Stack.\"),\n\t\t\tEndTimeUtc: pulumi.String(\"2022-04-06T13:58:42.969006+00:00\"),\n\t\t\tErrorMessage: pulumi.String(\"\"),\n\t\t\tLastUpdatedTimeUtc: pulumi.String(\"2022-04-06T13:58:42.969006+00:00\"),\n\t\t\tName: pulumi.String(\"Unnamed step\"),\n\t\t\tResourceGroupName: pulumi.String(\"testrg\"),\n\t\t\tStartTimeUtc: pulumi.String(\"2022-04-06T01:36:33.3876751+00:00\"),\n\t\t\tStatus: pulumi.String(\"Success\"),\n\t\t\tSteps: azurestackhci.StepArray{\n\t\t\t\t\u0026azurestackhci.StepArgs{\n\t\t\t\t\tDescription: pulumi.String(\"Prepare for SSU update\"),\n\t\t\t\t\tEndTimeUtc: pulumi.String(\"2022-04-06T01:37:16.8728314+00:00\"),\n\t\t\t\t\tErrorMessage: pulumi.String(\"\"),\n\t\t\t\t\tLastUpdatedTimeUtc: pulumi.String(\"2022-04-06T01:37:16.8728314+00:00\"),\n\t\t\t\t\tName: pulumi.String(\"PreUpdate Cloud\"),\n\t\t\t\t\tStartTimeUtc: pulumi.String(\"2022-04-06T01:36:33.3876751+00:00\"),\n\t\t\t\t\tStatus: pulumi.String(\"Success\"),\n\t\t\t\t\tSteps: azurestackhci.StepArray{},\n\t\t\t\t},\n\t\t\t},\n\t\t\tUpdateName: pulumi.String(\"Microsoft4.2203.2.32\"),\n\t\t\tUpdateRunName: pulumi.String(\"23b779ba-0d52-4a80-8571-45ca74664ec3\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.azurestackhci.UpdateRun;\nimport com.pulumi.azurenative.azurestackhci.UpdateRunArgs;\nimport com.pulumi.azurenative.azurestackhci.inputs.StepArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var updateRun = new UpdateRun(\"updateRun\", UpdateRunArgs.builder() \n .clusterName(\"testcluster\")\n .description(\"Update Azure Stack.\")\n .endTimeUtc(\"2022-04-06T13:58:42.969006+00:00\")\n .errorMessage(\"\")\n .lastUpdatedTimeUtc(\"2022-04-06T13:58:42.969006+00:00\")\n .name(\"Unnamed step\")\n .resourceGroupName(\"testrg\")\n .startTimeUtc(\"2022-04-06T01:36:33.3876751+00:00\")\n .status(\"Success\")\n .steps(StepArgs.builder()\n .description(\"Prepare for SSU update\")\n .endTimeUtc(\"2022-04-06T01:37:16.8728314+00:00\")\n .errorMessage(\"\")\n .lastUpdatedTimeUtc(\"2022-04-06T01:37:16.8728314+00:00\")\n .name(\"PreUpdate Cloud\")\n .startTimeUtc(\"2022-04-06T01:36:33.3876751+00:00\")\n .status(\"Success\")\n .steps()\n .build())\n .updateName(\"Microsoft4.2203.2.32\")\n .updateRunName(\"23b779ba-0d52-4a80-8571-45ca74664ec3\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst updateRun = new azure_native.azurestackhci.UpdateRun(\"updateRun\", {\n clusterName: \"testcluster\",\n description: \"Update Azure Stack.\",\n endTimeUtc: \"2022-04-06T13:58:42.969006+00:00\",\n errorMessage: \"\",\n lastUpdatedTimeUtc: \"2022-04-06T13:58:42.969006+00:00\",\n name: \"Unnamed step\",\n resourceGroupName: \"testrg\",\n startTimeUtc: \"2022-04-06T01:36:33.3876751+00:00\",\n status: \"Success\",\n steps: [{\n description: \"Prepare for SSU update\",\n endTimeUtc: \"2022-04-06T01:37:16.8728314+00:00\",\n errorMessage: \"\",\n lastUpdatedTimeUtc: \"2022-04-06T01:37:16.8728314+00:00\",\n name: \"PreUpdate Cloud\",\n startTimeUtc: \"2022-04-06T01:36:33.3876751+00:00\",\n status: \"Success\",\n steps: [],\n }],\n updateName: \"Microsoft4.2203.2.32\",\n updateRunName: \"23b779ba-0d52-4a80-8571-45ca74664ec3\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nupdate_run = azure_native.azurestackhci.UpdateRun(\"updateRun\",\n cluster_name=\"testcluster\",\n description=\"Update Azure Stack.\",\n end_time_utc=\"2022-04-06T13:58:42.969006+00:00\",\n error_message=\"\",\n last_updated_time_utc=\"2022-04-06T13:58:42.969006+00:00\",\n name=\"Unnamed step\",\n resource_group_name=\"testrg\",\n start_time_utc=\"2022-04-06T01:36:33.3876751+00:00\",\n status=\"Success\",\n steps=[azure_native.azurestackhci.StepArgs(\n description=\"Prepare for SSU update\",\n end_time_utc=\"2022-04-06T01:37:16.8728314+00:00\",\n error_message=\"\",\n last_updated_time_utc=\"2022-04-06T01:37:16.8728314+00:00\",\n name=\"PreUpdate Cloud\",\n start_time_utc=\"2022-04-06T01:36:33.3876751+00:00\",\n status=\"Success\",\n steps=[],\n )],\n update_name=\"Microsoft4.2203.2.32\",\n update_run_name=\"23b779ba-0d52-4a80-8571-45ca74664ec3\")\n\n```\n\n```yaml\nresources:\n updateRun:\n type: azure-native:azurestackhci:UpdateRun\n properties:\n clusterName: testcluster\n description: Update Azure Stack.\n endTimeUtc: 2022-04-06T13:58:42.969006+00:00\n errorMessage:\n lastUpdatedTimeUtc: 2022-04-06T13:58:42.969006+00:00\n name: Unnamed step\n resourceGroupName: testrg\n startTimeUtc: 2022-04-06T01:36:33.3876751+00:00\n status: Success\n steps:\n - description: Prepare for SSU update\n endTimeUtc: 2022-04-06T01:37:16.8728314+00:00\n errorMessage:\n lastUpdatedTimeUtc: 2022-04-06T01:37:16.8728314+00:00\n name: PreUpdate Cloud\n startTimeUtc: 2022-04-06T01:36:33.3876751+00:00\n status: Success\n steps: []\n updateName: Microsoft4.2203.2.32\n updateRunName: 23b779ba-0d52-4a80-8571-45ca74664ec3\n\n```\n\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nAn existing resource can be imported using its type token, name, and identifier, e.g.\n\n```sh\n$ pulumi import azure-native:azurestackhci:UpdateRun Microsoft4.2203.2.32/23b779ba-0d52-4a80-8571-45ca74664ec3 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/updateRuns/{updateRunName} \n```\n", + "description": "Details of an Update run\nAzure REST API version: 2023-03-01.\n\nOther available API versions: 2022-12-15-preview, 2023-06-01, 2023-08-01, 2023-08-01-preview, 2023-11-01-preview, 2024-01-01.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n### Get Update runs under cluster resource\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var updateRun = new AzureNative.AzureStackHCI.UpdateRun(\"updateRun\", new()\n {\n ClusterName = \"testcluster\",\n Description = \"Update Azure Stack.\",\n EndTimeUtc = \"2022-04-06T13:58:42.969006+00:00\",\n ErrorMessage = \"\",\n LastUpdatedTimeUtc = \"2022-04-06T13:58:42.969006+00:00\",\n Name = \"Unnamed step\",\n ResourceGroupName = \"testrg\",\n StartTimeUtc = \"2022-04-06T01:36:33.3876751+00:00\",\n Status = \"Success\",\n Steps = new[]\n {\n new AzureNative.AzureStackHCI.Inputs.StepArgs\n {\n Description = \"Prepare for SSU update\",\n EndTimeUtc = \"2022-04-06T01:37:16.8728314+00:00\",\n ErrorMessage = \"\",\n LastUpdatedTimeUtc = \"2022-04-06T01:37:16.8728314+00:00\",\n Name = \"PreUpdate Cloud\",\n StartTimeUtc = \"2022-04-06T01:36:33.3876751+00:00\",\n Status = \"Success\",\n Steps = new() { },\n },\n },\n UpdateName = \"Microsoft4.2203.2.32\",\n UpdateRunName = \"23b779ba-0d52-4a80-8571-45ca74664ec3\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/azurestackhci/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\n_, err := azurestackhci.NewUpdateRun(ctx, \"updateRun\", \u0026azurestackhci.UpdateRunArgs{\nClusterName: pulumi.String(\"testcluster\"),\nDescription: pulumi.String(\"Update Azure Stack.\"),\nEndTimeUtc: pulumi.String(\"2022-04-06T13:58:42.969006+00:00\"),\nErrorMessage: pulumi.String(\"\"),\nLastUpdatedTimeUtc: pulumi.String(\"2022-04-06T13:58:42.969006+00:00\"),\nName: pulumi.String(\"Unnamed step\"),\nResourceGroupName: pulumi.String(\"testrg\"),\nStartTimeUtc: pulumi.String(\"2022-04-06T01:36:33.3876751+00:00\"),\nStatus: pulumi.String(\"Success\"),\nSteps: azurestackhci.StepArray{\ninterface{}{\nDescription: pulumi.String(\"Prepare for SSU update\"),\nEndTimeUtc: pulumi.String(\"2022-04-06T01:37:16.8728314+00:00\"),\nErrorMessage: pulumi.String(\"\"),\nLastUpdatedTimeUtc: pulumi.String(\"2022-04-06T01:37:16.8728314+00:00\"),\nName: pulumi.String(\"PreUpdate Cloud\"),\nStartTimeUtc: pulumi.String(\"2022-04-06T01:36:33.3876751+00:00\"),\nStatus: pulumi.String(\"Success\"),\nSteps: azurestackhci.StepArray{\n},\n},\n},\nUpdateName: pulumi.String(\"Microsoft4.2203.2.32\"),\nUpdateRunName: pulumi.String(\"23b779ba-0d52-4a80-8571-45ca74664ec3\"),\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.azurestackhci.UpdateRun;\nimport com.pulumi.azurenative.azurestackhci.UpdateRunArgs;\nimport com.pulumi.azurenative.azurestackhci.inputs.StepArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var updateRun = new UpdateRun(\"updateRun\", UpdateRunArgs.builder() \n .clusterName(\"testcluster\")\n .description(\"Update Azure Stack.\")\n .endTimeUtc(\"2022-04-06T13:58:42.969006+00:00\")\n .errorMessage(\"\")\n .lastUpdatedTimeUtc(\"2022-04-06T13:58:42.969006+00:00\")\n .name(\"Unnamed step\")\n .resourceGroupName(\"testrg\")\n .startTimeUtc(\"2022-04-06T01:36:33.3876751+00:00\")\n .status(\"Success\")\n .steps(StepArgs.builder()\n .description(\"Prepare for SSU update\")\n .endTimeUtc(\"2022-04-06T01:37:16.8728314+00:00\")\n .errorMessage(\"\")\n .lastUpdatedTimeUtc(\"2022-04-06T01:37:16.8728314+00:00\")\n .name(\"PreUpdate Cloud\")\n .startTimeUtc(\"2022-04-06T01:36:33.3876751+00:00\")\n .status(\"Success\")\n .steps()\n .build())\n .updateName(\"Microsoft4.2203.2.32\")\n .updateRunName(\"23b779ba-0d52-4a80-8571-45ca74664ec3\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst updateRun = new azure_native.azurestackhci.UpdateRun(\"updateRun\", {\n clusterName: \"testcluster\",\n description: \"Update Azure Stack.\",\n endTimeUtc: \"2022-04-06T13:58:42.969006+00:00\",\n errorMessage: \"\",\n lastUpdatedTimeUtc: \"2022-04-06T13:58:42.969006+00:00\",\n name: \"Unnamed step\",\n resourceGroupName: \"testrg\",\n startTimeUtc: \"2022-04-06T01:36:33.3876751+00:00\",\n status: \"Success\",\n steps: [{\n description: \"Prepare for SSU update\",\n endTimeUtc: \"2022-04-06T01:37:16.8728314+00:00\",\n errorMessage: \"\",\n lastUpdatedTimeUtc: \"2022-04-06T01:37:16.8728314+00:00\",\n name: \"PreUpdate Cloud\",\n startTimeUtc: \"2022-04-06T01:36:33.3876751+00:00\",\n status: \"Success\",\n steps: [],\n }],\n updateName: \"Microsoft4.2203.2.32\",\n updateRunName: \"23b779ba-0d52-4a80-8571-45ca74664ec3\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nupdate_run = azure_native.azurestackhci.UpdateRun(\"updateRun\",\n cluster_name=\"testcluster\",\n description=\"Update Azure Stack.\",\n end_time_utc=\"2022-04-06T13:58:42.969006+00:00\",\n error_message=\"\",\n last_updated_time_utc=\"2022-04-06T13:58:42.969006+00:00\",\n name=\"Unnamed step\",\n resource_group_name=\"testrg\",\n start_time_utc=\"2022-04-06T01:36:33.3876751+00:00\",\n status=\"Success\",\n steps=[azure_native.azurestackhci.StepArgs(\n description=\"Prepare for SSU update\",\n end_time_utc=\"2022-04-06T01:37:16.8728314+00:00\",\n error_message=\"\",\n last_updated_time_utc=\"2022-04-06T01:37:16.8728314+00:00\",\n name=\"PreUpdate Cloud\",\n start_time_utc=\"2022-04-06T01:36:33.3876751+00:00\",\n status=\"Success\",\n steps=[],\n )],\n update_name=\"Microsoft4.2203.2.32\",\n update_run_name=\"23b779ba-0d52-4a80-8571-45ca74664ec3\")\n\n```\n\n```yaml\nresources:\n updateRun:\n type: azure-native:azurestackhci:UpdateRun\n properties:\n clusterName: testcluster\n description: Update Azure Stack.\n endTimeUtc: 2022-04-06T13:58:42.969006+00:00\n errorMessage:\n lastUpdatedTimeUtc: 2022-04-06T13:58:42.969006+00:00\n name: Unnamed step\n resourceGroupName: testrg\n startTimeUtc: 2022-04-06T01:36:33.3876751+00:00\n status: Success\n steps:\n - description: Prepare for SSU update\n endTimeUtc: 2022-04-06T01:37:16.8728314+00:00\n errorMessage:\n lastUpdatedTimeUtc: 2022-04-06T01:37:16.8728314+00:00\n name: PreUpdate Cloud\n startTimeUtc: 2022-04-06T01:36:33.3876751+00:00\n status: Success\n steps: []\n updateName: Microsoft4.2203.2.32\n updateRunName: 23b779ba-0d52-4a80-8571-45ca74664ec3\n\n```\n\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nAn existing resource can be imported using its type token, name, and identifier, e.g.\n\n```sh\n$ pulumi import azure-native:azurestackhci:UpdateRun Microsoft4.2203.2.32/23b779ba-0d52-4a80-8571-45ca74664ec3 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updates/{updateName}/updateRuns/{updateRunName} \n```\n", "properties": { "description": { "type": "string", @@ -578903,7 +579580,7 @@ ] }, "azure-native:machinelearning:WebService": { - "description": "Instance of an Azure ML web service resource.\nAzure REST API version: 2017-01-01. Prior API version in Azure Native 1.x: 2017-01-01.\n\nOther available API versions: 2016-05-01-preview.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n### PUT WebService\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var webService = new AzureNative.MachineLearning.WebService(\"webService\", new()\n {\n Location = \"West US\",\n Properties = new AzureNative.MachineLearning.Inputs.WebServicePropertiesForGraphArgs\n {\n Assets = \n {\n { \"asset1\", new AzureNative.MachineLearning.Inputs.AssetItemArgs\n {\n LocationInfo = new AzureNative.MachineLearning.Inputs.BlobLocationArgs\n {\n Credentials = \"\",\n Uri = \"aml://module/moduleId-1\",\n },\n Name = \"Execute R Script\",\n Type = \"Module\",\n } },\n { \"asset2\", new AzureNative.MachineLearning.Inputs.AssetItemArgs\n {\n LocationInfo = new AzureNative.MachineLearning.Inputs.BlobLocationArgs\n {\n Credentials = \"\",\n Uri = \"aml://module/moduleId-2\",\n },\n Name = \"Import Data\",\n Type = \"Module\",\n } },\n },\n CommitmentPlan = new AzureNative.MachineLearning.Inputs.CommitmentPlanArgs\n {\n Id = \"/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.MachineLearning/commitmentPlans/commitmentPlanName\",\n },\n Description = \"Web Service Description\",\n Diagnostics = new AzureNative.MachineLearning.Inputs.DiagnosticsConfigurationArgs\n {\n Level = \"None\",\n },\n ExampleRequest = new AzureNative.MachineLearning.Inputs.ExampleRequestArgs\n {\n Inputs = \n {\n { \"input1\", new[]\n {\n new[]\n {\n \"age\",\n },\n new[]\n {\n \"workclass\",\n },\n new[]\n {\n \"fnlwgt\",\n },\n new[]\n {\n \"education\",\n },\n new[]\n {\n \"education-num\",\n },\n } },\n },\n },\n ExposeSampleData = true,\n Input = new AzureNative.MachineLearning.Inputs.ServiceInputOutputSpecificationArgs\n {\n Description = \"\",\n Properties = \n {\n { \"input1\", new AzureNative.MachineLearning.Inputs.TableSpecificationArgs\n {\n Description = \"\",\n Properties = \n {\n { \"column_name\", new AzureNative.MachineLearning.Inputs.ColumnSpecificationArgs\n {\n Type = \"String\",\n XMsIsnullable = false,\n } },\n },\n Title = \"\",\n Type = \"object\",\n } },\n },\n Title = \"\",\n Type = \"object\",\n },\n MachineLearningWorkspace = new AzureNative.MachineLearning.Inputs.MachineLearningWorkspaceArgs\n {\n Id = \"workspaceId\",\n },\n Output = new AzureNative.MachineLearning.Inputs.ServiceInputOutputSpecificationArgs\n {\n Description = \"\",\n Properties = \n {\n { \"output1\", new AzureNative.MachineLearning.Inputs.TableSpecificationArgs\n {\n Description = \"\",\n Properties = \n {\n { \"age\", new AzureNative.MachineLearning.Inputs.ColumnSpecificationArgs\n {\n Format = \"Int32\",\n Type = \"Integer\",\n XMsIsnullable = true,\n } },\n { \"workclass\", new AzureNative.MachineLearning.Inputs.ColumnSpecificationArgs\n {\n Type = \"String\",\n XMsIsnullable = false,\n } },\n },\n Title = \"\",\n Type = \"object\",\n } },\n },\n Title = \"\",\n Type = \"object\",\n },\n Package = new AzureNative.MachineLearning.Inputs.GraphPackageArgs\n {\n Edges = new[]\n {\n new AzureNative.MachineLearning.Inputs.GraphEdgeArgs\n {\n SourceNodeId = \"node2\",\n SourcePortId = \"Results dataset\",\n TargetNodeId = \"node1\",\n TargetPortId = \"Dataset2\",\n },\n new AzureNative.MachineLearning.Inputs.GraphEdgeArgs\n {\n SourceNodeId = \"node3\",\n TargetNodeId = \"node1\",\n TargetPortId = \"Dataset1\",\n },\n new AzureNative.MachineLearning.Inputs.GraphEdgeArgs\n {\n SourceNodeId = \"node1\",\n SourcePortId = \"Result Dataset\",\n TargetNodeId = \"node4\",\n },\n },\n GraphParameters = null,\n Nodes = \n {\n { \"node1\", new AzureNative.MachineLearning.Inputs.GraphNodeArgs\n {\n AssetId = \"asset1\",\n Parameters = \n {\n { \"R Script\", new AzureNative.MachineLearning.Inputs.WebServiceParameterArgs\n {\n CertificateThumbprint = \"\",\n Value = \"The R Script\",\n } },\n { \"R Version\", new AzureNative.MachineLearning.Inputs.WebServiceParameterArgs\n {\n CertificateThumbprint = \"\",\n Value = \"CRAN R 3.1.0\",\n } },\n },\n } },\n { \"node2\", new AzureNative.MachineLearning.Inputs.GraphNodeArgs\n {\n AssetId = \"asset2\",\n Parameters = \n {\n { \"Account Key\", new AzureNative.MachineLearning.Inputs.WebServiceParameterArgs\n {\n CertificateThumbprint = \"TheThumbprint\",\n Value = \"Encrypted Key\",\n } },\n { \"Account Name\", new AzureNative.MachineLearning.Inputs.WebServiceParameterArgs\n {\n CertificateThumbprint = \"\",\n Value = \"accountName\",\n } },\n { \"Please Specify Authentication Type\", new AzureNative.MachineLearning.Inputs.WebServiceParameterArgs\n {\n CertificateThumbprint = \"\",\n Value = \"Account\",\n } },\n { \"Please Specify Data Source\", new AzureNative.MachineLearning.Inputs.WebServiceParameterArgs\n {\n CertificateThumbprint = \"\",\n Value = \"AzureBlobStorage\",\n } },\n },\n } },\n { \"node3\", new AzureNative.MachineLearning.Inputs.GraphNodeArgs\n {\n InputId = \"input1\",\n } },\n { \"node4\", new AzureNative.MachineLearning.Inputs.GraphNodeArgs\n {\n OutputId = \"output1\",\n } },\n },\n },\n PackageType = \"Graph\",\n Parameters = null,\n PayloadsInBlobStorage = false,\n ReadOnly = false,\n RealtimeConfiguration = new AzureNative.MachineLearning.Inputs.RealtimeConfigurationArgs\n {\n MaxConcurrentCalls = 4,\n },\n StorageAccount = new AzureNative.MachineLearning.Inputs.StorageAccountArgs\n {\n Key = \"Storage_Key\",\n Name = \"Storage_Name\",\n },\n Title = \"Web Service Title\",\n },\n ResourceGroupName = \"OneResourceGroupName\",\n Tags = \n {\n { \"tag1\", \"value1\" },\n { \"tag2\", \"value2\" },\n },\n WebServiceName = \"TargetWebServiceName\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/machinelearning/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\n_, err := machinelearning.NewWebService(ctx, \"webService\", \u0026machinelearning.WebServiceArgs{\nLocation: pulumi.String(\"West US\"),\nProperties: \u0026machinelearning.WebServicePropertiesForGraphArgs{\nAssets: interface{}{\nAsset1: \u0026machinelearning.AssetItemArgs{\nLocationInfo: \u0026machinelearning.BlobLocationArgs{\nCredentials: pulumi.String(\"\"),\nUri: pulumi.String(\"aml://module/moduleId-1\"),\n},\nName: pulumi.String(\"Execute R Script\"),\nType: pulumi.String(\"Module\"),\n},\nAsset2: \u0026machinelearning.AssetItemArgs{\nLocationInfo: \u0026machinelearning.BlobLocationArgs{\nCredentials: pulumi.String(\"\"),\nUri: pulumi.String(\"aml://module/moduleId-2\"),\n},\nName: pulumi.String(\"Import Data\"),\nType: pulumi.String(\"Module\"),\n},\n},\nCommitmentPlan: \u0026machinelearning.CommitmentPlanTypeArgs{\nId: pulumi.String(\"/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.MachineLearning/commitmentPlans/commitmentPlanName\"),\n},\nDescription: pulumi.String(\"Web Service Description\"),\nDiagnostics: \u0026machinelearning.DiagnosticsConfigurationArgs{\nLevel: pulumi.String(\"None\"),\n},\nExampleRequest: \u0026machinelearning.ExampleRequestArgs{\nInputs: pulumi.ArrayArrayMap{\n\"input1\": pulumi.ArrayArray{\npulumi.Array{\npulumi.Any(\"age\"),\n},\npulumi.Array{\npulumi.Any(\"workclass\"),\n},\npulumi.Array{\npulumi.Any(\"fnlwgt\"),\n},\npulumi.Array{\npulumi.Any(\"education\"),\n},\npulumi.Array{\npulumi.Any(\"education-num\"),\n},\n},\n},\n},\nExposeSampleData: pulumi.Bool(true),\nInput: \u0026machinelearning.ServiceInputOutputSpecificationArgs{\nDescription: pulumi.String(\"\"),\nProperties: machinelearning.TableSpecificationMap{\n\"input1\": \u0026machinelearning.TableSpecificationArgs{\nDescription: pulumi.String(\"\"),\nProperties: machinelearning.ColumnSpecificationMap{\n\"column_name\": \u0026machinelearning.ColumnSpecificationArgs{\nType: pulumi.String(\"String\"),\nXMsIsnullable: pulumi.Bool(false),\n},\n},\nTitle: pulumi.String(\"\"),\nType: pulumi.String(\"object\"),\n},\n},\nTitle: pulumi.String(\"\"),\nType: pulumi.String(\"object\"),\n},\nMachineLearningWorkspace: \u0026machinelearning.MachineLearningWorkspaceArgs{\nId: pulumi.String(\"workspaceId\"),\n},\nOutput: \u0026machinelearning.ServiceInputOutputSpecificationArgs{\nDescription: pulumi.String(\"\"),\nProperties: machinelearning.TableSpecificationMap{\n\"output1\": \u0026machinelearning.TableSpecificationArgs{\nDescription: pulumi.String(\"\"),\nProperties: machinelearning.ColumnSpecificationMap{\n\"age\": \u0026machinelearning.ColumnSpecificationArgs{\nFormat: pulumi.String(\"Int32\"),\nType: pulumi.String(\"Integer\"),\nXMsIsnullable: pulumi.Bool(true),\n},\n\"workclass\": \u0026machinelearning.ColumnSpecificationArgs{\nType: pulumi.String(\"String\"),\nXMsIsnullable: pulumi.Bool(false),\n},\n},\nTitle: pulumi.String(\"\"),\nType: pulumi.String(\"object\"),\n},\n},\nTitle: pulumi.String(\"\"),\nType: pulumi.String(\"object\"),\n},\nPackage: \u0026machinelearning.GraphPackageArgs{\nEdges: machinelearning.GraphEdgeArray{\n\u0026machinelearning.GraphEdgeArgs{\nSourceNodeId: pulumi.String(\"node2\"),\nSourcePortId: pulumi.String(\"Results dataset\"),\nTargetNodeId: pulumi.String(\"node1\"),\nTargetPortId: pulumi.String(\"Dataset2\"),\n},\n\u0026machinelearning.GraphEdgeArgs{\nSourceNodeId: pulumi.String(\"node3\"),\nTargetNodeId: pulumi.String(\"node1\"),\nTargetPortId: pulumi.String(\"Dataset1\"),\n},\n\u0026machinelearning.GraphEdgeArgs{\nSourceNodeId: pulumi.String(\"node1\"),\nSourcePortId: pulumi.String(\"Result Dataset\"),\nTargetNodeId: pulumi.String(\"node4\"),\n},\n},\nGraphParameters: nil,\nNodes: machinelearning.GraphNodeMap{\n\"node1\": \u0026machinelearning.GraphNodeArgs{\nAssetId: pulumi.String(\"asset1\"),\nParameters: machinelearning.WebServiceParameterMap{\n\"R Script\": \u0026machinelearning.WebServiceParameterArgs{\nCertificateThumbprint: pulumi.String(\"\"),\nValue: pulumi.Any(\"The R Script\"),\n},\n\"R Version\": \u0026machinelearning.WebServiceParameterArgs{\nCertificateThumbprint: pulumi.String(\"\"),\nValue: pulumi.Any(\"CRAN R 3.1.0\"),\n},\n},\n},\n\"node2\": \u0026machinelearning.GraphNodeArgs{\nAssetId: pulumi.String(\"asset2\"),\nParameters: machinelearning.WebServiceParameterMap{\n\"Account Key\": \u0026machinelearning.WebServiceParameterArgs{\nCertificateThumbprint: pulumi.String(\"TheThumbprint\"),\nValue: pulumi.Any(\"Encrypted Key\"),\n},\n\"Account Name\": \u0026machinelearning.WebServiceParameterArgs{\nCertificateThumbprint: pulumi.String(\"\"),\nValue: pulumi.Any(\"accountName\"),\n},\n\"Please Specify Authentication Type\": \u0026machinelearning.WebServiceParameterArgs{\nCertificateThumbprint: pulumi.String(\"\"),\nValue: pulumi.Any(\"Account\"),\n},\n\"Please Specify Data Source\": \u0026machinelearning.WebServiceParameterArgs{\nCertificateThumbprint: pulumi.String(\"\"),\nValue: pulumi.Any(\"AzureBlobStorage\"),\n},\n},\n},\n\"node3\": \u0026machinelearning.GraphNodeArgs{\nInputId: pulumi.String(\"input1\"),\n},\n\"node4\": \u0026machinelearning.GraphNodeArgs{\nOutputId: pulumi.String(\"output1\"),\n},\n},\n},\nPackageType: pulumi.String(\"Graph\"),\nParameters: nil,\nPayloadsInBlobStorage: pulumi.Bool(false),\nReadOnly: pulumi.Bool(false),\nRealtimeConfiguration: \u0026machinelearning.RealtimeConfigurationArgs{\nMaxConcurrentCalls: pulumi.Int(4),\n},\nStorageAccount: \u0026machinelearning.StorageAccountArgs{\nKey: pulumi.String(\"Storage_Key\"),\nName: pulumi.String(\"Storage_Name\"),\n},\nTitle: pulumi.String(\"Web Service Title\"),\n},\nResourceGroupName: pulumi.String(\"OneResourceGroupName\"),\nTags: pulumi.StringMap{\n\"tag1\": pulumi.String(\"value1\"),\n\"tag2\": pulumi.String(\"value2\"),\n},\nWebServiceName: pulumi.String(\"TargetWebServiceName\"),\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.machinelearning.WebService;\nimport com.pulumi.azurenative.machinelearning.WebServiceArgs;\nimport com.pulumi.azurenative.machinelearning.inputs.WebServicePropertiesForGraphArgs;\nimport com.pulumi.azurenative.machinelearning.inputs.CommitmentPlanArgs;\nimport com.pulumi.azurenative.machinelearning.inputs.DiagnosticsConfigurationArgs;\nimport com.pulumi.azurenative.machinelearning.inputs.ExampleRequestArgs;\nimport com.pulumi.azurenative.machinelearning.inputs.ServiceInputOutputSpecificationArgs;\nimport com.pulumi.azurenative.machinelearning.inputs.MachineLearningWorkspaceArgs;\nimport com.pulumi.azurenative.machinelearning.inputs.GraphPackageArgs;\nimport com.pulumi.azurenative.machinelearning.inputs.RealtimeConfigurationArgs;\nimport com.pulumi.azurenative.machinelearning.inputs.StorageAccountArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var webService = new WebService(\"webService\", WebServiceArgs.builder() \n .location(\"West US\")\n .properties(WebServicePropertiesForGraphArgs.builder()\n .assets(Map.ofEntries(\n Map.entry(\"asset1\", Map.ofEntries(\n Map.entry(\"locationInfo\", Map.ofEntries(\n Map.entry(\"credentials\", \"\"),\n Map.entry(\"uri\", \"aml://module/moduleId-1\")\n )),\n Map.entry(\"name\", \"Execute R Script\"),\n Map.entry(\"type\", \"Module\")\n )),\n Map.entry(\"asset2\", Map.ofEntries(\n Map.entry(\"locationInfo\", Map.ofEntries(\n Map.entry(\"credentials\", \"\"),\n Map.entry(\"uri\", \"aml://module/moduleId-2\")\n )),\n Map.entry(\"name\", \"Import Data\"),\n Map.entry(\"type\", \"Module\")\n ))\n ))\n .commitmentPlan(CommitmentPlanArgs.builder()\n .id(\"/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.MachineLearning/commitmentPlans/commitmentPlanName\")\n .build())\n .description(\"Web Service Description\")\n .diagnostics(DiagnosticsConfigurationArgs.builder()\n .level(\"None\")\n .build())\n .exampleRequest(ExampleRequestArgs.builder()\n .inputs(Map.of(\"input1\", \n \"age\",\n \"workclass\",\n \"fnlwgt\",\n \"education\",\n \"education-num\"))\n .build())\n .exposeSampleData(true)\n .input(ServiceInputOutputSpecificationArgs.builder()\n .description(\"\")\n .properties(Map.of(\"input1\", Map.ofEntries(\n Map.entry(\"description\", \"\"),\n Map.entry(\"properties\", Map.of(\"column_name\", Map.ofEntries(\n Map.entry(\"type\", \"String\"),\n Map.entry(\"xMsIsnullable\", false)\n ))),\n Map.entry(\"title\", \"\"),\n Map.entry(\"type\", \"object\")\n )))\n .title(\"\")\n .type(\"object\")\n .build())\n .machineLearningWorkspace(MachineLearningWorkspaceArgs.builder()\n .id(\"workspaceId\")\n .build())\n .output(ServiceInputOutputSpecificationArgs.builder()\n .description(\"\")\n .properties(Map.of(\"output1\", Map.ofEntries(\n Map.entry(\"description\", \"\"),\n Map.entry(\"properties\", Map.ofEntries(\n Map.entry(\"age\", Map.ofEntries(\n Map.entry(\"format\", \"Int32\"),\n Map.entry(\"type\", \"Integer\"),\n Map.entry(\"xMsIsnullable\", true)\n )),\n Map.entry(\"workclass\", Map.ofEntries(\n Map.entry(\"type\", \"String\"),\n Map.entry(\"xMsIsnullable\", false)\n ))\n )),\n Map.entry(\"title\", \"\"),\n Map.entry(\"type\", \"object\")\n )))\n .title(\"\")\n .type(\"object\")\n .build())\n .package_(GraphPackageArgs.builder()\n .edges( \n GraphEdgeArgs.builder()\n .sourceNodeId(\"node2\")\n .sourcePortId(\"Results dataset\")\n .targetNodeId(\"node1\")\n .targetPortId(\"Dataset2\")\n .build(),\n GraphEdgeArgs.builder()\n .sourceNodeId(\"node3\")\n .targetNodeId(\"node1\")\n .targetPortId(\"Dataset1\")\n .build(),\n GraphEdgeArgs.builder()\n .sourceNodeId(\"node1\")\n .sourcePortId(\"Result Dataset\")\n .targetNodeId(\"node4\")\n .build())\n .graphParameters()\n .nodes(Map.ofEntries(\n Map.entry(\"node1\", Map.ofEntries(\n Map.entry(\"assetId\", \"asset1\"),\n Map.entry(\"parameters\", Map.ofEntries(\n Map.entry(\"R Script\", Map.ofEntries(\n Map.entry(\"certificateThumbprint\", \"\"),\n Map.entry(\"value\", \"The R Script\")\n )),\n Map.entry(\"R Version\", Map.ofEntries(\n Map.entry(\"certificateThumbprint\", \"\"),\n Map.entry(\"value\", \"CRAN R 3.1.0\")\n ))\n ))\n )),\n Map.entry(\"node2\", Map.ofEntries(\n Map.entry(\"assetId\", \"asset2\"),\n Map.entry(\"parameters\", Map.ofEntries(\n Map.entry(\"Account Key\", Map.ofEntries(\n Map.entry(\"certificateThumbprint\", \"TheThumbprint\"),\n Map.entry(\"value\", \"Encrypted Key\")\n )),\n Map.entry(\"Account Name\", Map.ofEntries(\n Map.entry(\"certificateThumbprint\", \"\"),\n Map.entry(\"value\", \"accountName\")\n )),\n Map.entry(\"Please Specify Authentication Type\", Map.ofEntries(\n Map.entry(\"certificateThumbprint\", \"\"),\n Map.entry(\"value\", \"Account\")\n )),\n Map.entry(\"Please Specify Data Source\", Map.ofEntries(\n Map.entry(\"certificateThumbprint\", \"\"),\n Map.entry(\"value\", \"AzureBlobStorage\")\n ))\n ))\n )),\n Map.entry(\"node3\", Map.of(\"inputId\", \"input1\")),\n Map.entry(\"node4\", Map.of(\"outputId\", \"output1\"))\n ))\n .build())\n .packageType(\"Graph\")\n .parameters()\n .payloadsInBlobStorage(false)\n .readOnly(false)\n .realtimeConfiguration(RealtimeConfigurationArgs.builder()\n .maxConcurrentCalls(4)\n .build())\n .storageAccount(StorageAccountArgs.builder()\n .key(\"Storage_Key\")\n .name(\"Storage_Name\")\n .build())\n .title(\"Web Service Title\")\n .build())\n .resourceGroupName(\"OneResourceGroupName\")\n .tags(Map.ofEntries(\n Map.entry(\"tag1\", \"value1\"),\n Map.entry(\"tag2\", \"value2\")\n ))\n .webServiceName(\"TargetWebServiceName\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst webService = new azure_native.machinelearning.WebService(\"webService\", {\n location: \"West US\",\n properties: {\n assets: {\n asset1: {\n locationInfo: {\n credentials: \"\",\n uri: \"aml://module/moduleId-1\",\n },\n name: \"Execute R Script\",\n type: \"Module\",\n },\n asset2: {\n locationInfo: {\n credentials: \"\",\n uri: \"aml://module/moduleId-2\",\n },\n name: \"Import Data\",\n type: \"Module\",\n },\n },\n commitmentPlan: {\n id: \"/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.MachineLearning/commitmentPlans/commitmentPlanName\",\n },\n description: \"Web Service Description\",\n diagnostics: {\n level: \"None\",\n },\n exampleRequest: {\n inputs: {\n input1: [\n [\"age\"],\n [\"workclass\"],\n [\"fnlwgt\"],\n [\"education\"],\n [\"education-num\"],\n ],\n },\n },\n exposeSampleData: true,\n input: {\n description: \"\",\n properties: {\n input1: {\n description: \"\",\n properties: {\n column_name: {\n type: \"String\",\n xMsIsnullable: false,\n },\n },\n title: \"\",\n type: \"object\",\n },\n },\n title: \"\",\n type: \"object\",\n },\n machineLearningWorkspace: {\n id: \"workspaceId\",\n },\n output: {\n description: \"\",\n properties: {\n output1: {\n description: \"\",\n properties: {\n age: {\n format: \"Int32\",\n type: \"Integer\",\n xMsIsnullable: true,\n },\n workclass: {\n type: \"String\",\n xMsIsnullable: false,\n },\n },\n title: \"\",\n type: \"object\",\n },\n },\n title: \"\",\n type: \"object\",\n },\n \"package\": {\n edges: [\n {\n sourceNodeId: \"node2\",\n sourcePortId: \"Results dataset\",\n targetNodeId: \"node1\",\n targetPortId: \"Dataset2\",\n },\n {\n sourceNodeId: \"node3\",\n targetNodeId: \"node1\",\n targetPortId: \"Dataset1\",\n },\n {\n sourceNodeId: \"node1\",\n sourcePortId: \"Result Dataset\",\n targetNodeId: \"node4\",\n },\n ],\n graphParameters: {},\n nodes: {\n node1: {\n assetId: \"asset1\",\n parameters: {\n \"R Script\": {\n certificateThumbprint: \"\",\n value: \"The R Script\",\n },\n \"R Version\": {\n certificateThumbprint: \"\",\n value: \"CRAN R 3.1.0\",\n },\n },\n },\n node2: {\n assetId: \"asset2\",\n parameters: {\n \"Account Key\": {\n certificateThumbprint: \"TheThumbprint\",\n value: \"Encrypted Key\",\n },\n \"Account Name\": {\n certificateThumbprint: \"\",\n value: \"accountName\",\n },\n \"Please Specify Authentication Type\": {\n certificateThumbprint: \"\",\n value: \"Account\",\n },\n \"Please Specify Data Source\": {\n certificateThumbprint: \"\",\n value: \"AzureBlobStorage\",\n },\n },\n },\n node3: {\n inputId: \"input1\",\n },\n node4: {\n outputId: \"output1\",\n },\n },\n },\n packageType: \"Graph\",\n parameters: {},\n payloadsInBlobStorage: false,\n readOnly: false,\n realtimeConfiguration: {\n maxConcurrentCalls: 4,\n },\n storageAccount: {\n key: \"Storage_Key\",\n name: \"Storage_Name\",\n },\n title: \"Web Service Title\",\n },\n resourceGroupName: \"OneResourceGroupName\",\n tags: {\n tag1: \"value1\",\n tag2: \"value2\",\n },\n webServiceName: \"TargetWebServiceName\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nweb_service = azure_native.machinelearning.WebService(\"webService\",\n location=\"West US\",\n properties=azure_native.machinelearning.WebServicePropertiesForGraphArgs(\n assets={\n \"asset1\": azure_native.machinelearning.AssetItemArgs(\n location_info=azure_native.machinelearning.BlobLocationArgs(\n credentials=\"\",\n uri=\"aml://module/moduleId-1\",\n ),\n name=\"Execute R Script\",\n type=\"Module\",\n ),\n \"asset2\": azure_native.machinelearning.AssetItemArgs(\n location_info=azure_native.machinelearning.BlobLocationArgs(\n credentials=\"\",\n uri=\"aml://module/moduleId-2\",\n ),\n name=\"Import Data\",\n type=\"Module\",\n ),\n },\n commitment_plan=azure_native.machinelearning.CommitmentPlanArgs(\n id=\"/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.MachineLearning/commitmentPlans/commitmentPlanName\",\n ),\n description=\"Web Service Description\",\n diagnostics=azure_native.machinelearning.DiagnosticsConfigurationArgs(\n level=\"None\",\n ),\n example_request=azure_native.machinelearning.ExampleRequestArgs(\n inputs={\n \"input1\": [\n [\"age\"],\n [\"workclass\"],\n [\"fnlwgt\"],\n [\"education\"],\n [\"education-num\"],\n ],\n },\n ),\n expose_sample_data=True,\n input=azure_native.machinelearning.ServiceInputOutputSpecificationArgs(\n description=\"\",\n properties={\n \"input1\": azure_native.machinelearning.TableSpecificationArgs(\n description=\"\",\n properties={\n \"column_name\": azure_native.machinelearning.ColumnSpecificationArgs(\n type=\"String\",\n x_ms_isnullable=False,\n ),\n },\n title=\"\",\n type=\"object\",\n ),\n },\n title=\"\",\n type=\"object\",\n ),\n machine_learning_workspace=azure_native.machinelearning.MachineLearningWorkspaceArgs(\n id=\"workspaceId\",\n ),\n output=azure_native.machinelearning.ServiceInputOutputSpecificationArgs(\n description=\"\",\n properties={\n \"output1\": azure_native.machinelearning.TableSpecificationArgs(\n description=\"\",\n properties={\n \"age\": azure_native.machinelearning.ColumnSpecificationArgs(\n format=\"Int32\",\n type=\"Integer\",\n x_ms_isnullable=True,\n ),\n \"workclass\": azure_native.machinelearning.ColumnSpecificationArgs(\n type=\"String\",\n x_ms_isnullable=False,\n ),\n },\n title=\"\",\n type=\"object\",\n ),\n },\n title=\"\",\n type=\"object\",\n ),\n package=azure_native.machinelearning.GraphPackageArgs(\n edges=[\n azure_native.machinelearning.GraphEdgeArgs(\n source_node_id=\"node2\",\n source_port_id=\"Results dataset\",\n target_node_id=\"node1\",\n target_port_id=\"Dataset2\",\n ),\n azure_native.machinelearning.GraphEdgeArgs(\n source_node_id=\"node3\",\n target_node_id=\"node1\",\n target_port_id=\"Dataset1\",\n ),\n azure_native.machinelearning.GraphEdgeArgs(\n source_node_id=\"node1\",\n source_port_id=\"Result Dataset\",\n target_node_id=\"node4\",\n ),\n ],\n graph_parameters={},\n nodes={\n \"node1\": azure_native.machinelearning.GraphNodeArgs(\n asset_id=\"asset1\",\n parameters={\n \"R Script\": azure_native.machinelearning.WebServiceParameterArgs(\n certificate_thumbprint=\"\",\n value=\"The R Script\",\n ),\n \"R Version\": azure_native.machinelearning.WebServiceParameterArgs(\n certificate_thumbprint=\"\",\n value=\"CRAN R 3.1.0\",\n ),\n },\n ),\n \"node2\": azure_native.machinelearning.GraphNodeArgs(\n asset_id=\"asset2\",\n parameters={\n \"Account Key\": azure_native.machinelearning.WebServiceParameterArgs(\n certificate_thumbprint=\"TheThumbprint\",\n value=\"Encrypted Key\",\n ),\n \"Account Name\": azure_native.machinelearning.WebServiceParameterArgs(\n certificate_thumbprint=\"\",\n value=\"accountName\",\n ),\n \"Please Specify Authentication Type\": azure_native.machinelearning.WebServiceParameterArgs(\n certificate_thumbprint=\"\",\n value=\"Account\",\n ),\n \"Please Specify Data Source\": azure_native.machinelearning.WebServiceParameterArgs(\n certificate_thumbprint=\"\",\n value=\"AzureBlobStorage\",\n ),\n },\n ),\n \"node3\": azure_native.machinelearning.GraphNodeArgs(\n input_id=\"input1\",\n ),\n \"node4\": azure_native.machinelearning.GraphNodeArgs(\n output_id=\"output1\",\n ),\n },\n ),\n package_type=\"Graph\",\n parameters={},\n payloads_in_blob_storage=False,\n read_only=False,\n realtime_configuration=azure_native.machinelearning.RealtimeConfigurationArgs(\n max_concurrent_calls=4,\n ),\n storage_account=azure_native.machinelearning.StorageAccountArgs(\n key=\"Storage_Key\",\n name=\"Storage_Name\",\n ),\n title=\"Web Service Title\",\n ),\n resource_group_name=\"OneResourceGroupName\",\n tags={\n \"tag1\": \"value1\",\n \"tag2\": \"value2\",\n },\n web_service_name=\"TargetWebServiceName\")\n\n```\n\n```yaml\nresources:\n webService:\n type: azure-native:machinelearning:WebService\n properties:\n location: West US\n properties:\n assets:\n asset1:\n locationInfo:\n credentials:\n uri: aml://module/moduleId-1\n name: Execute R Script\n type: Module\n asset2:\n locationInfo:\n credentials:\n uri: aml://module/moduleId-2\n name: Import Data\n type: Module\n commitmentPlan:\n id: /subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.MachineLearning/commitmentPlans/commitmentPlanName\n description: Web Service Description\n diagnostics:\n level: None\n exampleRequest:\n inputs:\n input1:\n - - age\n - - workclass\n - - fnlwgt\n - - education\n - - education-num\n exposeSampleData: true\n input:\n description:\n properties:\n input1:\n description:\n properties:\n column_name:\n type: String\n xMsIsnullable: false\n title:\n type: object\n title:\n type: object\n machineLearningWorkspace:\n id: workspaceId\n output:\n description:\n properties:\n output1:\n description:\n properties:\n age:\n format: Int32\n type: Integer\n xMsIsnullable: true\n workclass:\n type: String\n xMsIsnullable: false\n title:\n type: object\n title:\n type: object\n package:\n edges:\n - sourceNodeId: node2\n sourcePortId: Results dataset\n targetNodeId: node1\n targetPortId: Dataset2\n - sourceNodeId: node3\n targetNodeId: node1\n targetPortId: Dataset1\n - sourceNodeId: node1\n sourcePortId: Result Dataset\n targetNodeId: node4\n graphParameters: {}\n nodes:\n node1:\n assetId: asset1\n parameters:\n R Script:\n certificateThumbprint:\n value: The R Script\n R Version:\n certificateThumbprint:\n value: CRAN R 3.1.0\n node2:\n assetId: asset2\n parameters:\n Account Key:\n certificateThumbprint: TheThumbprint\n value: Encrypted Key\n Account Name:\n certificateThumbprint:\n value: accountName\n Please Specify Authentication Type:\n certificateThumbprint:\n value: Account\n Please Specify Data Source:\n certificateThumbprint:\n value: AzureBlobStorage\n node3:\n inputId: input1\n node4:\n outputId: output1\n packageType: Graph\n parameters: {}\n payloadsInBlobStorage: false\n readOnly: false\n realtimeConfiguration:\n maxConcurrentCalls: 4\n storageAccount:\n key: Storage_Key\n name: Storage_Name\n title: Web Service Title\n resourceGroupName: OneResourceGroupName\n tags:\n tag1: value1\n tag2: value2\n webServiceName: TargetWebServiceName\n\n```\n\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nAn existing resource can be imported using its type token, name, and identifier, e.g.\n\n```sh\n$ pulumi import azure-native:machinelearning:WebService myresource1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/webServices/{webServiceName} \n```\n", + "description": "Instance of an Azure ML web service resource.\nAzure REST API version: 2017-01-01. Prior API version in Azure Native 1.x: 2017-01-01.\n\nOther available API versions: 2016-05-01-preview.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n### PUT WebService\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var webService = new AzureNative.MachineLearning.WebService(\"webService\", new()\n {\n Location = \"West US\",\n Properties = new AzureNative.MachineLearning.Inputs.WebServicePropertiesForGraphArgs\n {\n Assets = \n {\n { \"asset1\", new AzureNative.MachineLearning.Inputs.AssetItemArgs\n {\n LocationInfo = new AzureNative.MachineLearning.Inputs.BlobLocationArgs\n {\n Credentials = \"\",\n Uri = \"aml://module/moduleId-1\",\n },\n Name = \"Execute R Script\",\n Type = \"Module\",\n } },\n { \"asset2\", new AzureNative.MachineLearning.Inputs.AssetItemArgs\n {\n LocationInfo = new AzureNative.MachineLearning.Inputs.BlobLocationArgs\n {\n Credentials = \"\",\n Uri = \"aml://module/moduleId-2\",\n },\n Name = \"Import Data\",\n Type = \"Module\",\n } },\n },\n CommitmentPlan = new AzureNative.MachineLearning.Inputs.CommitmentPlanArgs\n {\n Id = \"/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.MachineLearning/commitmentPlans/commitmentPlanName\",\n },\n Description = \"Web Service Description\",\n Diagnostics = new AzureNative.MachineLearning.Inputs.DiagnosticsConfigurationArgs\n {\n Level = \"None\",\n },\n ExampleRequest = new AzureNative.MachineLearning.Inputs.ExampleRequestArgs\n {\n Inputs = \n {\n { \"input1\", new[]\n {\n new[]\n {\n \"age\",\n },\n new[]\n {\n \"workclass\",\n },\n new[]\n {\n \"fnlwgt\",\n },\n new[]\n {\n \"education\",\n },\n new[]\n {\n \"education-num\",\n },\n } },\n },\n },\n ExposeSampleData = true,\n Input = new AzureNative.MachineLearning.Inputs.ServiceInputOutputSpecificationArgs\n {\n Description = \"\",\n Properties = \n {\n { \"input1\", new AzureNative.MachineLearning.Inputs.TableSpecificationArgs\n {\n Description = \"\",\n Properties = \n {\n { \"column_name\", new AzureNative.MachineLearning.Inputs.ColumnSpecificationArgs\n {\n Type = \"String\",\n XMsIsnullable = false,\n } },\n },\n Title = \"\",\n Type = \"object\",\n } },\n },\n Title = \"\",\n Type = \"object\",\n },\n MachineLearningWorkspace = new AzureNative.MachineLearning.Inputs.MachineLearningWorkspaceArgs\n {\n Id = \"workspaceId\",\n },\n Output = new AzureNative.MachineLearning.Inputs.ServiceInputOutputSpecificationArgs\n {\n Description = \"\",\n Properties = \n {\n { \"output1\", new AzureNative.MachineLearning.Inputs.TableSpecificationArgs\n {\n Description = \"\",\n Properties = \n {\n { \"age\", new AzureNative.MachineLearning.Inputs.ColumnSpecificationArgs\n {\n Format = \"Int32\",\n Type = \"Integer\",\n XMsIsnullable = true,\n } },\n { \"workclass\", new AzureNative.MachineLearning.Inputs.ColumnSpecificationArgs\n {\n Type = \"String\",\n XMsIsnullable = false,\n } },\n },\n Title = \"\",\n Type = \"object\",\n } },\n },\n Title = \"\",\n Type = \"object\",\n },\n Package = new AzureNative.MachineLearning.Inputs.GraphPackageArgs\n {\n Edges = new[]\n {\n new AzureNative.MachineLearning.Inputs.GraphEdgeArgs\n {\n SourceNodeId = \"node2\",\n SourcePortId = \"Results dataset\",\n TargetNodeId = \"node1\",\n TargetPortId = \"Dataset2\",\n },\n new AzureNative.MachineLearning.Inputs.GraphEdgeArgs\n {\n SourceNodeId = \"node3\",\n TargetNodeId = \"node1\",\n TargetPortId = \"Dataset1\",\n },\n new AzureNative.MachineLearning.Inputs.GraphEdgeArgs\n {\n SourceNodeId = \"node1\",\n SourcePortId = \"Result Dataset\",\n TargetNodeId = \"node4\",\n },\n },\n GraphParameters = null,\n Nodes = \n {\n { \"node1\", new AzureNative.MachineLearning.Inputs.GraphNodeArgs\n {\n AssetId = \"asset1\",\n Parameters = \n {\n { \"R Script\", new AzureNative.MachineLearning.Inputs.WebServiceParameterArgs\n {\n CertificateThumbprint = \"\",\n Value = \"The R Script\",\n } },\n { \"R Version\", new AzureNative.MachineLearning.Inputs.WebServiceParameterArgs\n {\n CertificateThumbprint = \"\",\n Value = \"CRAN R 3.1.0\",\n } },\n },\n } },\n { \"node2\", new AzureNative.MachineLearning.Inputs.GraphNodeArgs\n {\n AssetId = \"asset2\",\n Parameters = \n {\n { \"Account Key\", new AzureNative.MachineLearning.Inputs.WebServiceParameterArgs\n {\n CertificateThumbprint = \"TheThumbprint\",\n Value = \"Encrypted Key\",\n } },\n { \"Account Name\", new AzureNative.MachineLearning.Inputs.WebServiceParameterArgs\n {\n CertificateThumbprint = \"\",\n Value = \"accountName\",\n } },\n { \"Please Specify Authentication Type\", new AzureNative.MachineLearning.Inputs.WebServiceParameterArgs\n {\n CertificateThumbprint = \"\",\n Value = \"Account\",\n } },\n { \"Please Specify Data Source\", new AzureNative.MachineLearning.Inputs.WebServiceParameterArgs\n {\n CertificateThumbprint = \"\",\n Value = \"AzureBlobStorage\",\n } },\n },\n } },\n { \"node3\", new AzureNative.MachineLearning.Inputs.GraphNodeArgs\n {\n InputId = \"input1\",\n } },\n { \"node4\", new AzureNative.MachineLearning.Inputs.GraphNodeArgs\n {\n OutputId = \"output1\",\n } },\n },\n },\n PackageType = \"Graph\",\n Parameters = null,\n PayloadsInBlobStorage = false,\n ReadOnly = false,\n RealtimeConfiguration = new AzureNative.MachineLearning.Inputs.RealtimeConfigurationArgs\n {\n MaxConcurrentCalls = 4,\n },\n StorageAccount = new AzureNative.MachineLearning.Inputs.StorageAccountArgs\n {\n Key = \"Storage_Key\",\n Name = \"Storage_Name\",\n },\n Title = \"Web Service Title\",\n },\n ResourceGroupName = \"OneResourceGroupName\",\n Tags = \n {\n { \"tag1\", \"value1\" },\n { \"tag2\", \"value2\" },\n },\n WebServiceName = \"TargetWebServiceName\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/machinelearning/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := machinelearning.NewWebService(ctx, \"webService\", \u0026machinelearning.WebServiceArgs{\n\t\t\tLocation: pulumi.String(\"West US\"),\n\t\t\tProperties: \u0026machinelearning.WebServicePropertiesForGraphArgs{\n\t\t\t\tAssets: machinelearning.AssetItemMap{\n\t\t\t\t\t\"asset1\": \u0026machinelearning.AssetItemArgs{\n\t\t\t\t\t\tLocationInfo: \u0026machinelearning.BlobLocationArgs{\n\t\t\t\t\t\t\tCredentials: pulumi.String(\"\"),\n\t\t\t\t\t\t\tUri: pulumi.String(\"aml://module/moduleId-1\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tName: pulumi.String(\"Execute R Script\"),\n\t\t\t\t\t\tType: pulumi.String(\"Module\"),\n\t\t\t\t\t},\n\t\t\t\t\t\"asset2\": \u0026machinelearning.AssetItemArgs{\n\t\t\t\t\t\tLocationInfo: \u0026machinelearning.BlobLocationArgs{\n\t\t\t\t\t\t\tCredentials: pulumi.String(\"\"),\n\t\t\t\t\t\t\tUri: pulumi.String(\"aml://module/moduleId-2\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tName: pulumi.String(\"Import Data\"),\n\t\t\t\t\t\tType: pulumi.String(\"Module\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tCommitmentPlan: \u0026machinelearning.CommitmentPlanTypeArgs{\n\t\t\t\t\tId: pulumi.String(\"/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.MachineLearning/commitmentPlans/commitmentPlanName\"),\n\t\t\t\t},\n\t\t\t\tDescription: pulumi.String(\"Web Service Description\"),\n\t\t\t\tDiagnostics: \u0026machinelearning.DiagnosticsConfigurationArgs{\n\t\t\t\t\tLevel: pulumi.String(\"None\"),\n\t\t\t\t},\n\t\t\t\tExampleRequest: \u0026machinelearning.ExampleRequestArgs{\n\t\t\t\t\tInputs: pulumi.ArrayArrayMap{\n\t\t\t\t\t\t\"input1\": pulumi.ArrayArray{\n\t\t\t\t\t\t\tpulumi.Array{\n\t\t\t\t\t\t\t\tpulumi.Any(\"age\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tpulumi.Array{\n\t\t\t\t\t\t\t\tpulumi.Any(\"workclass\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tpulumi.Array{\n\t\t\t\t\t\t\t\tpulumi.Any(\"fnlwgt\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tpulumi.Array{\n\t\t\t\t\t\t\t\tpulumi.Any(\"education\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tpulumi.Array{\n\t\t\t\t\t\t\t\tpulumi.Any(\"education-num\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tExposeSampleData: pulumi.Bool(true),\n\t\t\t\tInput: \u0026machinelearning.ServiceInputOutputSpecificationArgs{\n\t\t\t\t\tDescription: pulumi.String(\"\"),\n\t\t\t\t\tProperties: machinelearning.TableSpecificationMap{\n\t\t\t\t\t\t\"input1\": \u0026machinelearning.TableSpecificationArgs{\n\t\t\t\t\t\t\tDescription: pulumi.String(\"\"),\n\t\t\t\t\t\t\tProperties: machinelearning.ColumnSpecificationMap{\n\t\t\t\t\t\t\t\t\"column_name\": \u0026machinelearning.ColumnSpecificationArgs{\n\t\t\t\t\t\t\t\t\tType: pulumi.String(\"String\"),\n\t\t\t\t\t\t\t\t\tXMsIsnullable: pulumi.Bool(false),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tTitle: pulumi.String(\"\"),\n\t\t\t\t\t\t\tType: pulumi.String(\"object\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTitle: pulumi.String(\"\"),\n\t\t\t\t\tType: pulumi.String(\"object\"),\n\t\t\t\t},\n\t\t\t\tMachineLearningWorkspace: \u0026machinelearning.MachineLearningWorkspaceArgs{\n\t\t\t\t\tId: pulumi.String(\"workspaceId\"),\n\t\t\t\t},\n\t\t\t\tOutput: \u0026machinelearning.ServiceInputOutputSpecificationArgs{\n\t\t\t\t\tDescription: pulumi.String(\"\"),\n\t\t\t\t\tProperties: machinelearning.TableSpecificationMap{\n\t\t\t\t\t\t\"output1\": \u0026machinelearning.TableSpecificationArgs{\n\t\t\t\t\t\t\tDescription: pulumi.String(\"\"),\n\t\t\t\t\t\t\tProperties: machinelearning.ColumnSpecificationMap{\n\t\t\t\t\t\t\t\t\"age\": \u0026machinelearning.ColumnSpecificationArgs{\n\t\t\t\t\t\t\t\t\tFormat: pulumi.String(\"Int32\"),\n\t\t\t\t\t\t\t\t\tType: pulumi.String(\"Integer\"),\n\t\t\t\t\t\t\t\t\tXMsIsnullable: pulumi.Bool(true),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"workclass\": \u0026machinelearning.ColumnSpecificationArgs{\n\t\t\t\t\t\t\t\t\tType: pulumi.String(\"String\"),\n\t\t\t\t\t\t\t\t\tXMsIsnullable: pulumi.Bool(false),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tTitle: pulumi.String(\"\"),\n\t\t\t\t\t\t\tType: pulumi.String(\"object\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tTitle: pulumi.String(\"\"),\n\t\t\t\t\tType: pulumi.String(\"object\"),\n\t\t\t\t},\n\t\t\t\tPackage: \u0026machinelearning.GraphPackageArgs{\n\t\t\t\t\tEdges: machinelearning.GraphEdgeArray{\n\t\t\t\t\t\t\u0026machinelearning.GraphEdgeArgs{\n\t\t\t\t\t\t\tSourceNodeId: pulumi.String(\"node2\"),\n\t\t\t\t\t\t\tSourcePortId: pulumi.String(\"Results dataset\"),\n\t\t\t\t\t\t\tTargetNodeId: pulumi.String(\"node1\"),\n\t\t\t\t\t\t\tTargetPortId: pulumi.String(\"Dataset2\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026machinelearning.GraphEdgeArgs{\n\t\t\t\t\t\t\tSourceNodeId: pulumi.String(\"node3\"),\n\t\t\t\t\t\t\tTargetNodeId: pulumi.String(\"node1\"),\n\t\t\t\t\t\t\tTargetPortId: pulumi.String(\"Dataset1\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\u0026machinelearning.GraphEdgeArgs{\n\t\t\t\t\t\t\tSourceNodeId: pulumi.String(\"node1\"),\n\t\t\t\t\t\t\tSourcePortId: pulumi.String(\"Result Dataset\"),\n\t\t\t\t\t\t\tTargetNodeId: pulumi.String(\"node4\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tGraphParameters: nil,\n\t\t\t\t\tNodes: machinelearning.GraphNodeMap{\n\t\t\t\t\t\t\"node1\": \u0026machinelearning.GraphNodeArgs{\n\t\t\t\t\t\t\tAssetId: pulumi.String(\"asset1\"),\n\t\t\t\t\t\t\tParameters: machinelearning.WebServiceParameterMap{\n\t\t\t\t\t\t\t\t\"R Script\": \u0026machinelearning.WebServiceParameterArgs{\n\t\t\t\t\t\t\t\t\tCertificateThumbprint: pulumi.String(\"\"),\n\t\t\t\t\t\t\t\t\tValue: pulumi.Any(\"The R Script\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"R Version\": \u0026machinelearning.WebServiceParameterArgs{\n\t\t\t\t\t\t\t\t\tCertificateThumbprint: pulumi.String(\"\"),\n\t\t\t\t\t\t\t\t\tValue: pulumi.Any(\"CRAN R 3.1.0\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"node2\": \u0026machinelearning.GraphNodeArgs{\n\t\t\t\t\t\t\tAssetId: pulumi.String(\"asset2\"),\n\t\t\t\t\t\t\tParameters: machinelearning.WebServiceParameterMap{\n\t\t\t\t\t\t\t\t\"Account Key\": \u0026machinelearning.WebServiceParameterArgs{\n\t\t\t\t\t\t\t\t\tCertificateThumbprint: pulumi.String(\"TheThumbprint\"),\n\t\t\t\t\t\t\t\t\tValue: pulumi.Any(\"Encrypted Key\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"Account Name\": \u0026machinelearning.WebServiceParameterArgs{\n\t\t\t\t\t\t\t\t\tCertificateThumbprint: pulumi.String(\"\"),\n\t\t\t\t\t\t\t\t\tValue: pulumi.Any(\"accountName\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"Please Specify Authentication Type\": \u0026machinelearning.WebServiceParameterArgs{\n\t\t\t\t\t\t\t\t\tCertificateThumbprint: pulumi.String(\"\"),\n\t\t\t\t\t\t\t\t\tValue: pulumi.Any(\"Account\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"Please Specify Data Source\": \u0026machinelearning.WebServiceParameterArgs{\n\t\t\t\t\t\t\t\t\tCertificateThumbprint: pulumi.String(\"\"),\n\t\t\t\t\t\t\t\t\tValue: pulumi.Any(\"AzureBlobStorage\"),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"node3\": \u0026machinelearning.GraphNodeArgs{\n\t\t\t\t\t\t\tInputId: pulumi.String(\"input1\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"node4\": \u0026machinelearning.GraphNodeArgs{\n\t\t\t\t\t\t\tOutputId: pulumi.String(\"output1\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tPackageType: pulumi.String(\"Graph\"),\n\t\t\t\tParameters: nil,\n\t\t\t\tPayloadsInBlobStorage: pulumi.Bool(false),\n\t\t\t\tReadOnly: pulumi.Bool(false),\n\t\t\t\tRealtimeConfiguration: \u0026machinelearning.RealtimeConfigurationArgs{\n\t\t\t\t\tMaxConcurrentCalls: pulumi.Int(4),\n\t\t\t\t},\n\t\t\t\tStorageAccount: \u0026machinelearning.StorageAccountArgs{\n\t\t\t\t\tKey: pulumi.String(\"Storage_Key\"),\n\t\t\t\t\tName: pulumi.String(\"Storage_Name\"),\n\t\t\t\t},\n\t\t\t\tTitle: pulumi.String(\"Web Service Title\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"OneResourceGroupName\"),\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"tag1\": pulumi.String(\"value1\"),\n\t\t\t\t\"tag2\": pulumi.String(\"value2\"),\n\t\t\t},\n\t\t\tWebServiceName: pulumi.String(\"TargetWebServiceName\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.machinelearning.WebService;\nimport com.pulumi.azurenative.machinelearning.WebServiceArgs;\nimport com.pulumi.azurenative.machinelearning.inputs.WebServicePropertiesForGraphArgs;\nimport com.pulumi.azurenative.machinelearning.inputs.CommitmentPlanArgs;\nimport com.pulumi.azurenative.machinelearning.inputs.DiagnosticsConfigurationArgs;\nimport com.pulumi.azurenative.machinelearning.inputs.ExampleRequestArgs;\nimport com.pulumi.azurenative.machinelearning.inputs.ServiceInputOutputSpecificationArgs;\nimport com.pulumi.azurenative.machinelearning.inputs.MachineLearningWorkspaceArgs;\nimport com.pulumi.azurenative.machinelearning.inputs.GraphPackageArgs;\nimport com.pulumi.azurenative.machinelearning.inputs.RealtimeConfigurationArgs;\nimport com.pulumi.azurenative.machinelearning.inputs.StorageAccountArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var webService = new WebService(\"webService\", WebServiceArgs.builder() \n .location(\"West US\")\n .properties(WebServicePropertiesForGraphArgs.builder()\n .assets(Map.ofEntries(\n Map.entry(\"asset1\", Map.ofEntries(\n Map.entry(\"locationInfo\", Map.ofEntries(\n Map.entry(\"credentials\", \"\"),\n Map.entry(\"uri\", \"aml://module/moduleId-1\")\n )),\n Map.entry(\"name\", \"Execute R Script\"),\n Map.entry(\"type\", \"Module\")\n )),\n Map.entry(\"asset2\", Map.ofEntries(\n Map.entry(\"locationInfo\", Map.ofEntries(\n Map.entry(\"credentials\", \"\"),\n Map.entry(\"uri\", \"aml://module/moduleId-2\")\n )),\n Map.entry(\"name\", \"Import Data\"),\n Map.entry(\"type\", \"Module\")\n ))\n ))\n .commitmentPlan(CommitmentPlanArgs.builder()\n .id(\"/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.MachineLearning/commitmentPlans/commitmentPlanName\")\n .build())\n .description(\"Web Service Description\")\n .diagnostics(DiagnosticsConfigurationArgs.builder()\n .level(\"None\")\n .build())\n .exampleRequest(ExampleRequestArgs.builder()\n .inputs(Map.of(\"input1\", \n \"age\",\n \"workclass\",\n \"fnlwgt\",\n \"education\",\n \"education-num\"))\n .build())\n .exposeSampleData(true)\n .input(ServiceInputOutputSpecificationArgs.builder()\n .description(\"\")\n .properties(Map.of(\"input1\", Map.ofEntries(\n Map.entry(\"description\", \"\"),\n Map.entry(\"properties\", Map.of(\"column_name\", Map.ofEntries(\n Map.entry(\"type\", \"String\"),\n Map.entry(\"xMsIsnullable\", false)\n ))),\n Map.entry(\"title\", \"\"),\n Map.entry(\"type\", \"object\")\n )))\n .title(\"\")\n .type(\"object\")\n .build())\n .machineLearningWorkspace(MachineLearningWorkspaceArgs.builder()\n .id(\"workspaceId\")\n .build())\n .output(ServiceInputOutputSpecificationArgs.builder()\n .description(\"\")\n .properties(Map.of(\"output1\", Map.ofEntries(\n Map.entry(\"description\", \"\"),\n Map.entry(\"properties\", Map.ofEntries(\n Map.entry(\"age\", Map.ofEntries(\n Map.entry(\"format\", \"Int32\"),\n Map.entry(\"type\", \"Integer\"),\n Map.entry(\"xMsIsnullable\", true)\n )),\n Map.entry(\"workclass\", Map.ofEntries(\n Map.entry(\"type\", \"String\"),\n Map.entry(\"xMsIsnullable\", false)\n ))\n )),\n Map.entry(\"title\", \"\"),\n Map.entry(\"type\", \"object\")\n )))\n .title(\"\")\n .type(\"object\")\n .build())\n .package_(GraphPackageArgs.builder()\n .edges( \n GraphEdgeArgs.builder()\n .sourceNodeId(\"node2\")\n .sourcePortId(\"Results dataset\")\n .targetNodeId(\"node1\")\n .targetPortId(\"Dataset2\")\n .build(),\n GraphEdgeArgs.builder()\n .sourceNodeId(\"node3\")\n .targetNodeId(\"node1\")\n .targetPortId(\"Dataset1\")\n .build(),\n GraphEdgeArgs.builder()\n .sourceNodeId(\"node1\")\n .sourcePortId(\"Result Dataset\")\n .targetNodeId(\"node4\")\n .build())\n .graphParameters()\n .nodes(Map.ofEntries(\n Map.entry(\"node1\", Map.ofEntries(\n Map.entry(\"assetId\", \"asset1\"),\n Map.entry(\"parameters\", Map.ofEntries(\n Map.entry(\"R Script\", Map.ofEntries(\n Map.entry(\"certificateThumbprint\", \"\"),\n Map.entry(\"value\", \"The R Script\")\n )),\n Map.entry(\"R Version\", Map.ofEntries(\n Map.entry(\"certificateThumbprint\", \"\"),\n Map.entry(\"value\", \"CRAN R 3.1.0\")\n ))\n ))\n )),\n Map.entry(\"node2\", Map.ofEntries(\n Map.entry(\"assetId\", \"asset2\"),\n Map.entry(\"parameters\", Map.ofEntries(\n Map.entry(\"Account Key\", Map.ofEntries(\n Map.entry(\"certificateThumbprint\", \"TheThumbprint\"),\n Map.entry(\"value\", \"Encrypted Key\")\n )),\n Map.entry(\"Account Name\", Map.ofEntries(\n Map.entry(\"certificateThumbprint\", \"\"),\n Map.entry(\"value\", \"accountName\")\n )),\n Map.entry(\"Please Specify Authentication Type\", Map.ofEntries(\n Map.entry(\"certificateThumbprint\", \"\"),\n Map.entry(\"value\", \"Account\")\n )),\n Map.entry(\"Please Specify Data Source\", Map.ofEntries(\n Map.entry(\"certificateThumbprint\", \"\"),\n Map.entry(\"value\", \"AzureBlobStorage\")\n ))\n ))\n )),\n Map.entry(\"node3\", Map.of(\"inputId\", \"input1\")),\n Map.entry(\"node4\", Map.of(\"outputId\", \"output1\"))\n ))\n .build())\n .packageType(\"Graph\")\n .parameters()\n .payloadsInBlobStorage(false)\n .readOnly(false)\n .realtimeConfiguration(RealtimeConfigurationArgs.builder()\n .maxConcurrentCalls(4)\n .build())\n .storageAccount(StorageAccountArgs.builder()\n .key(\"Storage_Key\")\n .name(\"Storage_Name\")\n .build())\n .title(\"Web Service Title\")\n .build())\n .resourceGroupName(\"OneResourceGroupName\")\n .tags(Map.ofEntries(\n Map.entry(\"tag1\", \"value1\"),\n Map.entry(\"tag2\", \"value2\")\n ))\n .webServiceName(\"TargetWebServiceName\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst webService = new azure_native.machinelearning.WebService(\"webService\", {\n location: \"West US\",\n properties: {\n assets: {\n asset1: {\n locationInfo: {\n credentials: \"\",\n uri: \"aml://module/moduleId-1\",\n },\n name: \"Execute R Script\",\n type: \"Module\",\n },\n asset2: {\n locationInfo: {\n credentials: \"\",\n uri: \"aml://module/moduleId-2\",\n },\n name: \"Import Data\",\n type: \"Module\",\n },\n },\n commitmentPlan: {\n id: \"/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.MachineLearning/commitmentPlans/commitmentPlanName\",\n },\n description: \"Web Service Description\",\n diagnostics: {\n level: \"None\",\n },\n exampleRequest: {\n inputs: {\n input1: [\n [\"age\"],\n [\"workclass\"],\n [\"fnlwgt\"],\n [\"education\"],\n [\"education-num\"],\n ],\n },\n },\n exposeSampleData: true,\n input: {\n description: \"\",\n properties: {\n input1: {\n description: \"\",\n properties: {\n column_name: {\n type: \"String\",\n xMsIsnullable: false,\n },\n },\n title: \"\",\n type: \"object\",\n },\n },\n title: \"\",\n type: \"object\",\n },\n machineLearningWorkspace: {\n id: \"workspaceId\",\n },\n output: {\n description: \"\",\n properties: {\n output1: {\n description: \"\",\n properties: {\n age: {\n format: \"Int32\",\n type: \"Integer\",\n xMsIsnullable: true,\n },\n workclass: {\n type: \"String\",\n xMsIsnullable: false,\n },\n },\n title: \"\",\n type: \"object\",\n },\n },\n title: \"\",\n type: \"object\",\n },\n \"package\": {\n edges: [\n {\n sourceNodeId: \"node2\",\n sourcePortId: \"Results dataset\",\n targetNodeId: \"node1\",\n targetPortId: \"Dataset2\",\n },\n {\n sourceNodeId: \"node3\",\n targetNodeId: \"node1\",\n targetPortId: \"Dataset1\",\n },\n {\n sourceNodeId: \"node1\",\n sourcePortId: \"Result Dataset\",\n targetNodeId: \"node4\",\n },\n ],\n graphParameters: {},\n nodes: {\n node1: {\n assetId: \"asset1\",\n parameters: {\n \"R Script\": {\n certificateThumbprint: \"\",\n value: \"The R Script\",\n },\n \"R Version\": {\n certificateThumbprint: \"\",\n value: \"CRAN R 3.1.0\",\n },\n },\n },\n node2: {\n assetId: \"asset2\",\n parameters: {\n \"Account Key\": {\n certificateThumbprint: \"TheThumbprint\",\n value: \"Encrypted Key\",\n },\n \"Account Name\": {\n certificateThumbprint: \"\",\n value: \"accountName\",\n },\n \"Please Specify Authentication Type\": {\n certificateThumbprint: \"\",\n value: \"Account\",\n },\n \"Please Specify Data Source\": {\n certificateThumbprint: \"\",\n value: \"AzureBlobStorage\",\n },\n },\n },\n node3: {\n inputId: \"input1\",\n },\n node4: {\n outputId: \"output1\",\n },\n },\n },\n packageType: \"Graph\",\n parameters: {},\n payloadsInBlobStorage: false,\n readOnly: false,\n realtimeConfiguration: {\n maxConcurrentCalls: 4,\n },\n storageAccount: {\n key: \"Storage_Key\",\n name: \"Storage_Name\",\n },\n title: \"Web Service Title\",\n },\n resourceGroupName: \"OneResourceGroupName\",\n tags: {\n tag1: \"value1\",\n tag2: \"value2\",\n },\n webServiceName: \"TargetWebServiceName\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nweb_service = azure_native.machinelearning.WebService(\"webService\",\n location=\"West US\",\n properties=azure_native.machinelearning.WebServicePropertiesForGraphArgs(\n assets={\n \"asset1\": azure_native.machinelearning.AssetItemArgs(\n location_info=azure_native.machinelearning.BlobLocationArgs(\n credentials=\"\",\n uri=\"aml://module/moduleId-1\",\n ),\n name=\"Execute R Script\",\n type=\"Module\",\n ),\n \"asset2\": azure_native.machinelearning.AssetItemArgs(\n location_info=azure_native.machinelearning.BlobLocationArgs(\n credentials=\"\",\n uri=\"aml://module/moduleId-2\",\n ),\n name=\"Import Data\",\n type=\"Module\",\n ),\n },\n commitment_plan=azure_native.machinelearning.CommitmentPlanArgs(\n id=\"/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.MachineLearning/commitmentPlans/commitmentPlanName\",\n ),\n description=\"Web Service Description\",\n diagnostics=azure_native.machinelearning.DiagnosticsConfigurationArgs(\n level=\"None\",\n ),\n example_request=azure_native.machinelearning.ExampleRequestArgs(\n inputs={\n \"input1\": [\n [\"age\"],\n [\"workclass\"],\n [\"fnlwgt\"],\n [\"education\"],\n [\"education-num\"],\n ],\n },\n ),\n expose_sample_data=True,\n input=azure_native.machinelearning.ServiceInputOutputSpecificationArgs(\n description=\"\",\n properties={\n \"input1\": azure_native.machinelearning.TableSpecificationArgs(\n description=\"\",\n properties={\n \"column_name\": azure_native.machinelearning.ColumnSpecificationArgs(\n type=\"String\",\n x_ms_isnullable=False,\n ),\n },\n title=\"\",\n type=\"object\",\n ),\n },\n title=\"\",\n type=\"object\",\n ),\n machine_learning_workspace=azure_native.machinelearning.MachineLearningWorkspaceArgs(\n id=\"workspaceId\",\n ),\n output=azure_native.machinelearning.ServiceInputOutputSpecificationArgs(\n description=\"\",\n properties={\n \"output1\": azure_native.machinelearning.TableSpecificationArgs(\n description=\"\",\n properties={\n \"age\": azure_native.machinelearning.ColumnSpecificationArgs(\n format=\"Int32\",\n type=\"Integer\",\n x_ms_isnullable=True,\n ),\n \"workclass\": azure_native.machinelearning.ColumnSpecificationArgs(\n type=\"String\",\n x_ms_isnullable=False,\n ),\n },\n title=\"\",\n type=\"object\",\n ),\n },\n title=\"\",\n type=\"object\",\n ),\n package=azure_native.machinelearning.GraphPackageArgs(\n edges=[\n azure_native.machinelearning.GraphEdgeArgs(\n source_node_id=\"node2\",\n source_port_id=\"Results dataset\",\n target_node_id=\"node1\",\n target_port_id=\"Dataset2\",\n ),\n azure_native.machinelearning.GraphEdgeArgs(\n source_node_id=\"node3\",\n target_node_id=\"node1\",\n target_port_id=\"Dataset1\",\n ),\n azure_native.machinelearning.GraphEdgeArgs(\n source_node_id=\"node1\",\n source_port_id=\"Result Dataset\",\n target_node_id=\"node4\",\n ),\n ],\n graph_parameters={},\n nodes={\n \"node1\": azure_native.machinelearning.GraphNodeArgs(\n asset_id=\"asset1\",\n parameters={\n \"R Script\": azure_native.machinelearning.WebServiceParameterArgs(\n certificate_thumbprint=\"\",\n value=\"The R Script\",\n ),\n \"R Version\": azure_native.machinelearning.WebServiceParameterArgs(\n certificate_thumbprint=\"\",\n value=\"CRAN R 3.1.0\",\n ),\n },\n ),\n \"node2\": azure_native.machinelearning.GraphNodeArgs(\n asset_id=\"asset2\",\n parameters={\n \"Account Key\": azure_native.machinelearning.WebServiceParameterArgs(\n certificate_thumbprint=\"TheThumbprint\",\n value=\"Encrypted Key\",\n ),\n \"Account Name\": azure_native.machinelearning.WebServiceParameterArgs(\n certificate_thumbprint=\"\",\n value=\"accountName\",\n ),\n \"Please Specify Authentication Type\": azure_native.machinelearning.WebServiceParameterArgs(\n certificate_thumbprint=\"\",\n value=\"Account\",\n ),\n \"Please Specify Data Source\": azure_native.machinelearning.WebServiceParameterArgs(\n certificate_thumbprint=\"\",\n value=\"AzureBlobStorage\",\n ),\n },\n ),\n \"node3\": azure_native.machinelearning.GraphNodeArgs(\n input_id=\"input1\",\n ),\n \"node4\": azure_native.machinelearning.GraphNodeArgs(\n output_id=\"output1\",\n ),\n },\n ),\n package_type=\"Graph\",\n parameters={},\n payloads_in_blob_storage=False,\n read_only=False,\n realtime_configuration=azure_native.machinelearning.RealtimeConfigurationArgs(\n max_concurrent_calls=4,\n ),\n storage_account=azure_native.machinelearning.StorageAccountArgs(\n key=\"Storage_Key\",\n name=\"Storage_Name\",\n ),\n title=\"Web Service Title\",\n ),\n resource_group_name=\"OneResourceGroupName\",\n tags={\n \"tag1\": \"value1\",\n \"tag2\": \"value2\",\n },\n web_service_name=\"TargetWebServiceName\")\n\n```\n\n```yaml\nresources:\n webService:\n type: azure-native:machinelearning:WebService\n properties:\n location: West US\n properties:\n assets:\n asset1:\n locationInfo:\n credentials:\n uri: aml://module/moduleId-1\n name: Execute R Script\n type: Module\n asset2:\n locationInfo:\n credentials:\n uri: aml://module/moduleId-2\n name: Import Data\n type: Module\n commitmentPlan:\n id: /subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.MachineLearning/commitmentPlans/commitmentPlanName\n description: Web Service Description\n diagnostics:\n level: None\n exampleRequest:\n inputs:\n input1:\n - - age\n - - workclass\n - - fnlwgt\n - - education\n - - education-num\n exposeSampleData: true\n input:\n description:\n properties:\n input1:\n description:\n properties:\n column_name:\n type: String\n xMsIsnullable: false\n title:\n type: object\n title:\n type: object\n machineLearningWorkspace:\n id: workspaceId\n output:\n description:\n properties:\n output1:\n description:\n properties:\n age:\n format: Int32\n type: Integer\n xMsIsnullable: true\n workclass:\n type: String\n xMsIsnullable: false\n title:\n type: object\n title:\n type: object\n package:\n edges:\n - sourceNodeId: node2\n sourcePortId: Results dataset\n targetNodeId: node1\n targetPortId: Dataset2\n - sourceNodeId: node3\n targetNodeId: node1\n targetPortId: Dataset1\n - sourceNodeId: node1\n sourcePortId: Result Dataset\n targetNodeId: node4\n graphParameters: {}\n nodes:\n node1:\n assetId: asset1\n parameters:\n R Script:\n certificateThumbprint:\n value: The R Script\n R Version:\n certificateThumbprint:\n value: CRAN R 3.1.0\n node2:\n assetId: asset2\n parameters:\n Account Key:\n certificateThumbprint: TheThumbprint\n value: Encrypted Key\n Account Name:\n certificateThumbprint:\n value: accountName\n Please Specify Authentication Type:\n certificateThumbprint:\n value: Account\n Please Specify Data Source:\n certificateThumbprint:\n value: AzureBlobStorage\n node3:\n inputId: input1\n node4:\n outputId: output1\n packageType: Graph\n parameters: {}\n payloadsInBlobStorage: false\n readOnly: false\n realtimeConfiguration:\n maxConcurrentCalls: 4\n storageAccount:\n key: Storage_Key\n name: Storage_Name\n title: Web Service Title\n resourceGroupName: OneResourceGroupName\n tags:\n tag1: value1\n tag2: value2\n webServiceName: TargetWebServiceName\n\n```\n\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nAn existing resource can be imported using its type token, name, and identifier, e.g.\n\n```sh\n$ pulumi import azure-native:machinelearning:WebService myresource1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/webServices/{webServiceName} \n```\n", "properties": { "location": { "type": "string", @@ -582445,7 +583122,7 @@ ] }, "azure-native:machinelearningservices:LabelingJob": { - "description": "Azure Resource Manager resource envelope.\nAzure REST API version: 2023-04-01-preview. Prior API version in Azure Native 1.x: 2020-09-01-preview.\n\nOther available API versions: 2020-09-01-preview, 2021-03-01-preview, 2023-06-01-preview, 2023-08-01-preview, 2024-01-01-preview.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n### CreateOrUpdate Labeling Job.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var labelingJob = new AzureNative.MachineLearningServices.LabelingJob(\"labelingJob\", new()\n {\n Id = \"testLabelingJob\",\n LabelingJobProperties = new AzureNative.MachineLearningServices.Inputs.LabelingJobArgs\n {\n Description = \"string\",\n JobInstructions = new AzureNative.MachineLearningServices.Inputs.LabelingJobInstructionsArgs\n {\n Uri = \"link/to/instructions\",\n },\n JobType = \"Labeling\",\n LabelCategories = \n {\n { \"myCategory1\", new AzureNative.MachineLearningServices.Inputs.LabelCategoryArgs\n {\n Classes = \n {\n { \"myLabelClass1\", new AzureNative.MachineLearningServices.Inputs.LabelClassArgs\n {\n DisplayName = \"myLabelClass1\",\n Subclasses = null,\n } },\n { \"myLabelClass2\", new AzureNative.MachineLearningServices.Inputs.LabelClassArgs\n {\n DisplayName = \"myLabelClass2\",\n Subclasses = null,\n } },\n },\n DisplayName = \"myCategory1Title\",\n MultiSelect = \"Disabled\",\n } },\n { \"myCategory2\", new AzureNative.MachineLearningServices.Inputs.LabelCategoryArgs\n {\n Classes = \n {\n { \"myLabelClass1\", new AzureNative.MachineLearningServices.Inputs.LabelClassArgs\n {\n DisplayName = \"myLabelClass1\",\n Subclasses = null,\n } },\n { \"myLabelClass2\", new AzureNative.MachineLearningServices.Inputs.LabelClassArgs\n {\n DisplayName = \"myLabelClass2\",\n Subclasses = null,\n } },\n },\n DisplayName = \"myCategory2Title\",\n MultiSelect = \"Disabled\",\n } },\n },\n LabelingJobMediaProperties = new AzureNative.MachineLearningServices.Inputs.LabelingJobImagePropertiesArgs\n {\n MediaType = \"Image\",\n },\n MlAssistConfiguration = new AzureNative.MachineLearningServices.Inputs.MLAssistConfigurationEnabledArgs\n {\n InferencingComputeBinding = \"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute\",\n MlAssist = \"Enabled\",\n TrainingComputeBinding = \"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute\",\n },\n Properties = \n {\n { \"additionalProp1\", \"string\" },\n { \"additionalProp2\", \"string\" },\n { \"additionalProp3\", \"string\" },\n },\n Tags = \n {\n { \"additionalProp1\", \"string\" },\n { \"additionalProp2\", \"string\" },\n { \"additionalProp3\", \"string\" },\n },\n },\n ResourceGroupName = \"workspace-1234\",\n WorkspaceName = \"testworkspace\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/machinelearningservices/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\n_, err := machinelearningservices.NewLabelingJob(ctx, \"labelingJob\", \u0026machinelearningservices.LabelingJobArgs{\nId: pulumi.String(\"testLabelingJob\"),\nLabelingJobProperties: \u0026machinelearningservices.LabelingJobTypeArgs{\nDescription: pulumi.String(\"string\"),\nJobInstructions: \u0026machinelearningservices.LabelingJobInstructionsArgs{\nUri: pulumi.String(\"link/to/instructions\"),\n},\nJobType: pulumi.String(\"Labeling\"),\nLabelCategories: machinelearningservices.LabelCategoryMap{\n\"myCategory1\": \u0026machinelearningservices.LabelCategoryArgs{\nClasses: interface{}{\nMyLabelClass1: \u0026machinelearningservices.LabelClassArgs{\nDisplayName: pulumi.String(\"myLabelClass1\"),\nSubclasses: nil,\n},\nMyLabelClass2: \u0026machinelearningservices.LabelClassArgs{\nDisplayName: pulumi.String(\"myLabelClass2\"),\nSubclasses: nil,\n},\n},\nDisplayName: pulumi.String(\"myCategory1Title\"),\nMultiSelect: pulumi.String(\"Disabled\"),\n},\n\"myCategory2\": interface{}{\nClasses: machinelearningservices.LabelClassMap{\n\"myLabelClass1\": interface{}{\nDisplayName: pulumi.String(\"myLabelClass1\"),\nSubclasses: nil,\n},\n\"myLabelClass2\": \u0026machinelearningservices.LabelClassArgs{\nDisplayName: pulumi.String(\"myLabelClass2\"),\nSubclasses: nil,\n},\n},\nDisplayName: pulumi.String(\"myCategory2Title\"),\nMultiSelect: pulumi.String(\"Disabled\"),\n},\n},\nLabelingJobMediaProperties: machinelearningservices.LabelingJobImageProperties{\nMediaType: \"Image\",\n},\nMlAssistConfiguration: machinelearningservices.MLAssistConfigurationEnabled{\nInferencingComputeBinding: \"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute\",\nMlAssist: \"Enabled\",\nTrainingComputeBinding: \"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute\",\n},\nProperties: pulumi.StringMap{\n\"additionalProp1\": pulumi.String(\"string\"),\n\"additionalProp2\": pulumi.String(\"string\"),\n\"additionalProp3\": pulumi.String(\"string\"),\n},\nTags: pulumi.StringMap{\n\"additionalProp1\": pulumi.String(\"string\"),\n\"additionalProp2\": pulumi.String(\"string\"),\n\"additionalProp3\": pulumi.String(\"string\"),\n},\n},\nResourceGroupName: pulumi.String(\"workspace-1234\"),\nWorkspaceName: pulumi.String(\"testworkspace\"),\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.machinelearningservices.LabelingJob;\nimport com.pulumi.azurenative.machinelearningservices.LabelingJobArgs;\nimport com.pulumi.azurenative.machinelearningservices.inputs.LabelingJobArgs;\nimport com.pulumi.azurenative.machinelearningservices.inputs.LabelingJobInstructionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var labelingJob = new LabelingJob(\"labelingJob\", LabelingJobArgs.builder() \n .id(\"testLabelingJob\")\n .labelingJobProperties(LabelingJobArgs.builder()\n .description(\"string\")\n .jobInstructions(LabelingJobInstructionsArgs.builder()\n .uri(\"link/to/instructions\")\n .build())\n .jobType(\"Labeling\")\n .labelCategories(Map.ofEntries(\n Map.entry(\"myCategory1\", Map.ofEntries(\n Map.entry(\"classes\", Map.ofEntries(\n Map.entry(\"myLabelClass1\", Map.ofEntries(\n Map.entry(\"displayName\", \"myLabelClass1\"),\n Map.entry(\"subclasses\", )\n )),\n Map.entry(\"myLabelClass2\", Map.ofEntries(\n Map.entry(\"displayName\", \"myLabelClass2\"),\n Map.entry(\"subclasses\", )\n ))\n )),\n Map.entry(\"displayName\", \"myCategory1Title\"),\n Map.entry(\"multiSelect\", \"Disabled\")\n )),\n Map.entry(\"myCategory2\", Map.ofEntries(\n Map.entry(\"classes\", Map.ofEntries(\n Map.entry(\"myLabelClass1\", Map.ofEntries(\n Map.entry(\"displayName\", \"myLabelClass1\"),\n Map.entry(\"subclasses\", )\n )),\n Map.entry(\"myLabelClass2\", Map.ofEntries(\n Map.entry(\"displayName\", \"myLabelClass2\"),\n Map.entry(\"subclasses\", )\n ))\n )),\n Map.entry(\"displayName\", \"myCategory2Title\"),\n Map.entry(\"multiSelect\", \"Disabled\")\n ))\n ))\n .labelingJobMediaProperties(LabelingJobImagePropertiesArgs.builder()\n .mediaType(\"Image\")\n .build())\n .mlAssistConfiguration(MLAssistConfigurationEnabledArgs.builder()\n .inferencingComputeBinding(\"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute\")\n .mlAssist(\"Enabled\")\n .trainingComputeBinding(\"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute\")\n .build())\n .properties(Map.ofEntries(\n Map.entry(\"additionalProp1\", \"string\"),\n Map.entry(\"additionalProp2\", \"string\"),\n Map.entry(\"additionalProp3\", \"string\")\n ))\n .tags(Map.ofEntries(\n Map.entry(\"additionalProp1\", \"string\"),\n Map.entry(\"additionalProp2\", \"string\"),\n Map.entry(\"additionalProp3\", \"string\")\n ))\n .build())\n .resourceGroupName(\"workspace-1234\")\n .workspaceName(\"testworkspace\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst labelingJob = new azure_native.machinelearningservices.LabelingJob(\"labelingJob\", {\n id: \"testLabelingJob\",\n labelingJobProperties: {\n description: \"string\",\n jobInstructions: {\n uri: \"link/to/instructions\",\n },\n jobType: \"Labeling\",\n labelCategories: {\n myCategory1: {\n classes: {\n myLabelClass1: {\n displayName: \"myLabelClass1\",\n subclasses: {},\n },\n myLabelClass2: {\n displayName: \"myLabelClass2\",\n subclasses: {},\n },\n },\n displayName: \"myCategory1Title\",\n multiSelect: \"Disabled\",\n },\n myCategory2: {\n classes: {\n myLabelClass1: {\n displayName: \"myLabelClass1\",\n subclasses: {},\n },\n myLabelClass2: {\n displayName: \"myLabelClass2\",\n subclasses: {},\n },\n },\n displayName: \"myCategory2Title\",\n multiSelect: \"Disabled\",\n },\n },\n labelingJobMediaProperties: {\n mediaType: \"Image\",\n },\n mlAssistConfiguration: {\n inferencingComputeBinding: \"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute\",\n mlAssist: \"Enabled\",\n trainingComputeBinding: \"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute\",\n },\n properties: {\n additionalProp1: \"string\",\n additionalProp2: \"string\",\n additionalProp3: \"string\",\n },\n tags: {\n additionalProp1: \"string\",\n additionalProp2: \"string\",\n additionalProp3: \"string\",\n },\n },\n resourceGroupName: \"workspace-1234\",\n workspaceName: \"testworkspace\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nlabeling_job = azure_native.machinelearningservices.LabelingJob(\"labelingJob\",\n id=\"testLabelingJob\",\n labeling_job_properties=azure_native.machinelearningservices.LabelingJobArgs(\n description=\"string\",\n job_instructions=azure_native.machinelearningservices.LabelingJobInstructionsArgs(\n uri=\"link/to/instructions\",\n ),\n job_type=\"Labeling\",\n label_categories={\n \"myCategory1\": azure_native.machinelearningservices.LabelCategoryArgs(\n classes={\n \"myLabelClass1\": azure_native.machinelearningservices.LabelClassArgs(\n display_name=\"myLabelClass1\",\n subclasses={},\n ),\n \"myLabelClass2\": azure_native.machinelearningservices.LabelClassArgs(\n display_name=\"myLabelClass2\",\n subclasses={},\n ),\n },\n display_name=\"myCategory1Title\",\n multi_select=\"Disabled\",\n ),\n \"myCategory2\": azure_native.machinelearningservices.LabelCategoryArgs(\n classes={\n \"myLabelClass1\": azure_native.machinelearningservices.LabelClassArgs(\n display_name=\"myLabelClass1\",\n subclasses={},\n ),\n \"myLabelClass2\": azure_native.machinelearningservices.LabelClassArgs(\n display_name=\"myLabelClass2\",\n subclasses={},\n ),\n },\n display_name=\"myCategory2Title\",\n multi_select=\"Disabled\",\n ),\n },\n labeling_job_media_properties=azure_native.machinelearningservices.LabelingJobImagePropertiesArgs(\n media_type=\"Image\",\n ),\n ml_assist_configuration=azure_native.machinelearningservices.MLAssistConfigurationEnabledArgs(\n inferencing_compute_binding=\"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute\",\n ml_assist=\"Enabled\",\n training_compute_binding=\"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute\",\n ),\n properties={\n \"additionalProp1\": \"string\",\n \"additionalProp2\": \"string\",\n \"additionalProp3\": \"string\",\n },\n tags={\n \"additionalProp1\": \"string\",\n \"additionalProp2\": \"string\",\n \"additionalProp3\": \"string\",\n },\n ),\n resource_group_name=\"workspace-1234\",\n workspace_name=\"testworkspace\")\n\n```\n\n```yaml\nresources:\n labelingJob:\n type: azure-native:machinelearningservices:LabelingJob\n properties:\n id: testLabelingJob\n labelingJobProperties:\n description: string\n jobInstructions:\n uri: link/to/instructions\n jobType: Labeling\n labelCategories:\n myCategory1:\n classes:\n myLabelClass1:\n displayName: myLabelClass1\n subclasses: {}\n myLabelClass2:\n displayName: myLabelClass2\n subclasses: {}\n displayName: myCategory1Title\n multiSelect: Disabled\n myCategory2:\n classes:\n myLabelClass1:\n displayName: myLabelClass1\n subclasses: {}\n myLabelClass2:\n displayName: myLabelClass2\n subclasses: {}\n displayName: myCategory2Title\n multiSelect: Disabled\n labelingJobMediaProperties:\n mediaType: Image\n mlAssistConfiguration:\n inferencingComputeBinding: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute\n mlAssist: Enabled\n trainingComputeBinding: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute\n properties:\n additionalProp1: string\n additionalProp2: string\n additionalProp3: string\n tags:\n additionalProp1: string\n additionalProp2: string\n additionalProp3: string\n resourceGroupName: workspace-1234\n workspaceName: testworkspace\n\n```\n\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nAn existing resource can be imported using its type token, name, and identifier, e.g.\n\n```sh\n$ pulumi import azure-native:machinelearningservices:LabelingJob testLabelingJob /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id} \n```\n", + "description": "Azure Resource Manager resource envelope.\nAzure REST API version: 2023-04-01-preview. Prior API version in Azure Native 1.x: 2020-09-01-preview.\n\nOther available API versions: 2020-09-01-preview, 2021-03-01-preview, 2023-06-01-preview, 2023-08-01-preview, 2024-01-01-preview.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n### CreateOrUpdate Labeling Job.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var labelingJob = new AzureNative.MachineLearningServices.LabelingJob(\"labelingJob\", new()\n {\n Id = \"testLabelingJob\",\n LabelingJobProperties = new AzureNative.MachineLearningServices.Inputs.LabelingJobArgs\n {\n Description = \"string\",\n JobInstructions = new AzureNative.MachineLearningServices.Inputs.LabelingJobInstructionsArgs\n {\n Uri = \"link/to/instructions\",\n },\n JobType = \"Labeling\",\n LabelCategories = \n {\n { \"myCategory1\", new AzureNative.MachineLearningServices.Inputs.LabelCategoryArgs\n {\n Classes = \n {\n { \"myLabelClass1\", new AzureNative.MachineLearningServices.Inputs.LabelClassArgs\n {\n DisplayName = \"myLabelClass1\",\n Subclasses = null,\n } },\n { \"myLabelClass2\", new AzureNative.MachineLearningServices.Inputs.LabelClassArgs\n {\n DisplayName = \"myLabelClass2\",\n Subclasses = null,\n } },\n },\n DisplayName = \"myCategory1Title\",\n MultiSelect = \"Disabled\",\n } },\n { \"myCategory2\", new AzureNative.MachineLearningServices.Inputs.LabelCategoryArgs\n {\n Classes = \n {\n { \"myLabelClass1\", new AzureNative.MachineLearningServices.Inputs.LabelClassArgs\n {\n DisplayName = \"myLabelClass1\",\n Subclasses = null,\n } },\n { \"myLabelClass2\", new AzureNative.MachineLearningServices.Inputs.LabelClassArgs\n {\n DisplayName = \"myLabelClass2\",\n Subclasses = null,\n } },\n },\n DisplayName = \"myCategory2Title\",\n MultiSelect = \"Disabled\",\n } },\n },\n LabelingJobMediaProperties = new AzureNative.MachineLearningServices.Inputs.LabelingJobImagePropertiesArgs\n {\n MediaType = \"Image\",\n },\n MlAssistConfiguration = new AzureNative.MachineLearningServices.Inputs.MLAssistConfigurationEnabledArgs\n {\n InferencingComputeBinding = \"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute\",\n MlAssist = \"Enabled\",\n TrainingComputeBinding = \"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute\",\n },\n Properties = \n {\n { \"additionalProp1\", \"string\" },\n { \"additionalProp2\", \"string\" },\n { \"additionalProp3\", \"string\" },\n },\n Tags = \n {\n { \"additionalProp1\", \"string\" },\n { \"additionalProp2\", \"string\" },\n { \"additionalProp3\", \"string\" },\n },\n },\n ResourceGroupName = \"workspace-1234\",\n WorkspaceName = \"testworkspace\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/machinelearningservices/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\nfunc main() {\npulumi.Run(func(ctx *pulumi.Context) error {\n_, err := machinelearningservices.NewLabelingJob(ctx, \"labelingJob\", \u0026machinelearningservices.LabelingJobArgs{\nId: pulumi.String(\"testLabelingJob\"),\nLabelingJobProperties: \u0026machinelearningservices.LabelingJobTypeArgs{\nDescription: pulumi.String(\"string\"),\nJobInstructions: \u0026machinelearningservices.LabelingJobInstructionsArgs{\nUri: pulumi.String(\"link/to/instructions\"),\n},\nJobType: pulumi.String(\"Labeling\"),\nLabelCategories: machinelearningservices.LabelCategoryMap{\n\"myCategory1\": interface{}{\nClasses: machinelearningservices.LabelClassMap{\n\"myLabelClass1\": \u0026machinelearningservices.LabelClassArgs{\nDisplayName: pulumi.String(\"myLabelClass1\"),\nSubclasses: nil,\n},\n\"myLabelClass2\": \u0026machinelearningservices.LabelClassArgs{\nDisplayName: pulumi.String(\"myLabelClass2\"),\nSubclasses: nil,\n},\n},\nDisplayName: pulumi.String(\"myCategory1Title\"),\nMultiSelect: pulumi.String(\"Disabled\"),\n},\n\"myCategory2\": \u0026machinelearningservices.LabelCategoryArgs{\nClasses: machinelearningservices.LabelClassMap{\n\"myLabelClass1\": \u0026machinelearningservices.LabelClassArgs{\nDisplayName: pulumi.String(\"myLabelClass1\"),\nSubclasses: nil,\n},\n\"myLabelClass2\": \u0026machinelearningservices.LabelClassArgs{\nDisplayName: pulumi.String(\"myLabelClass2\"),\nSubclasses: nil,\n},\n},\nDisplayName: pulumi.String(\"myCategory2Title\"),\nMultiSelect: pulumi.String(\"Disabled\"),\n},\n},\nLabelingJobMediaProperties: machinelearningservices.LabelingJobImageProperties{\nMediaType: \"Image\",\n},\nMlAssistConfiguration: machinelearningservices.MLAssistConfigurationEnabled{\nInferencingComputeBinding: \"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute\",\nMlAssist: \"Enabled\",\nTrainingComputeBinding: \"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute\",\n},\nProperties: pulumi.StringMap{\n\"additionalProp1\": pulumi.String(\"string\"),\n\"additionalProp2\": pulumi.String(\"string\"),\n\"additionalProp3\": pulumi.String(\"string\"),\n},\nTags: pulumi.StringMap{\n\"additionalProp1\": pulumi.String(\"string\"),\n\"additionalProp2\": pulumi.String(\"string\"),\n\"additionalProp3\": pulumi.String(\"string\"),\n},\n},\nResourceGroupName: pulumi.String(\"workspace-1234\"),\nWorkspaceName: pulumi.String(\"testworkspace\"),\n})\nif err != nil {\nreturn err\n}\nreturn nil\n})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.machinelearningservices.LabelingJob;\nimport com.pulumi.azurenative.machinelearningservices.LabelingJobArgs;\nimport com.pulumi.azurenative.machinelearningservices.inputs.LabelingJobArgs;\nimport com.pulumi.azurenative.machinelearningservices.inputs.LabelingJobInstructionsArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var labelingJob = new LabelingJob(\"labelingJob\", LabelingJobArgs.builder() \n .id(\"testLabelingJob\")\n .labelingJobProperties(LabelingJobArgs.builder()\n .description(\"string\")\n .jobInstructions(LabelingJobInstructionsArgs.builder()\n .uri(\"link/to/instructions\")\n .build())\n .jobType(\"Labeling\")\n .labelCategories(Map.ofEntries(\n Map.entry(\"myCategory1\", Map.ofEntries(\n Map.entry(\"classes\", Map.ofEntries(\n Map.entry(\"myLabelClass1\", Map.ofEntries(\n Map.entry(\"displayName\", \"myLabelClass1\"),\n Map.entry(\"subclasses\", )\n )),\n Map.entry(\"myLabelClass2\", Map.ofEntries(\n Map.entry(\"displayName\", \"myLabelClass2\"),\n Map.entry(\"subclasses\", )\n ))\n )),\n Map.entry(\"displayName\", \"myCategory1Title\"),\n Map.entry(\"multiSelect\", \"Disabled\")\n )),\n Map.entry(\"myCategory2\", Map.ofEntries(\n Map.entry(\"classes\", Map.ofEntries(\n Map.entry(\"myLabelClass1\", Map.ofEntries(\n Map.entry(\"displayName\", \"myLabelClass1\"),\n Map.entry(\"subclasses\", )\n )),\n Map.entry(\"myLabelClass2\", Map.ofEntries(\n Map.entry(\"displayName\", \"myLabelClass2\"),\n Map.entry(\"subclasses\", )\n ))\n )),\n Map.entry(\"displayName\", \"myCategory2Title\"),\n Map.entry(\"multiSelect\", \"Disabled\")\n ))\n ))\n .labelingJobMediaProperties(LabelingJobImagePropertiesArgs.builder()\n .mediaType(\"Image\")\n .build())\n .mlAssistConfiguration(MLAssistConfigurationEnabledArgs.builder()\n .inferencingComputeBinding(\"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute\")\n .mlAssist(\"Enabled\")\n .trainingComputeBinding(\"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute\")\n .build())\n .properties(Map.ofEntries(\n Map.entry(\"additionalProp1\", \"string\"),\n Map.entry(\"additionalProp2\", \"string\"),\n Map.entry(\"additionalProp3\", \"string\")\n ))\n .tags(Map.ofEntries(\n Map.entry(\"additionalProp1\", \"string\"),\n Map.entry(\"additionalProp2\", \"string\"),\n Map.entry(\"additionalProp3\", \"string\")\n ))\n .build())\n .resourceGroupName(\"workspace-1234\")\n .workspaceName(\"testworkspace\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst labelingJob = new azure_native.machinelearningservices.LabelingJob(\"labelingJob\", {\n id: \"testLabelingJob\",\n labelingJobProperties: {\n description: \"string\",\n jobInstructions: {\n uri: \"link/to/instructions\",\n },\n jobType: \"Labeling\",\n labelCategories: {\n myCategory1: {\n classes: {\n myLabelClass1: {\n displayName: \"myLabelClass1\",\n subclasses: {},\n },\n myLabelClass2: {\n displayName: \"myLabelClass2\",\n subclasses: {},\n },\n },\n displayName: \"myCategory1Title\",\n multiSelect: \"Disabled\",\n },\n myCategory2: {\n classes: {\n myLabelClass1: {\n displayName: \"myLabelClass1\",\n subclasses: {},\n },\n myLabelClass2: {\n displayName: \"myLabelClass2\",\n subclasses: {},\n },\n },\n displayName: \"myCategory2Title\",\n multiSelect: \"Disabled\",\n },\n },\n labelingJobMediaProperties: {\n mediaType: \"Image\",\n },\n mlAssistConfiguration: {\n inferencingComputeBinding: \"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute\",\n mlAssist: \"Enabled\",\n trainingComputeBinding: \"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute\",\n },\n properties: {\n additionalProp1: \"string\",\n additionalProp2: \"string\",\n additionalProp3: \"string\",\n },\n tags: {\n additionalProp1: \"string\",\n additionalProp2: \"string\",\n additionalProp3: \"string\",\n },\n },\n resourceGroupName: \"workspace-1234\",\n workspaceName: \"testworkspace\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nlabeling_job = azure_native.machinelearningservices.LabelingJob(\"labelingJob\",\n id=\"testLabelingJob\",\n labeling_job_properties=azure_native.machinelearningservices.LabelingJobArgs(\n description=\"string\",\n job_instructions=azure_native.machinelearningservices.LabelingJobInstructionsArgs(\n uri=\"link/to/instructions\",\n ),\n job_type=\"Labeling\",\n label_categories={\n \"myCategory1\": azure_native.machinelearningservices.LabelCategoryArgs(\n classes={\n \"myLabelClass1\": azure_native.machinelearningservices.LabelClassArgs(\n display_name=\"myLabelClass1\",\n subclasses={},\n ),\n \"myLabelClass2\": azure_native.machinelearningservices.LabelClassArgs(\n display_name=\"myLabelClass2\",\n subclasses={},\n ),\n },\n display_name=\"myCategory1Title\",\n multi_select=\"Disabled\",\n ),\n \"myCategory2\": azure_native.machinelearningservices.LabelCategoryArgs(\n classes={\n \"myLabelClass1\": azure_native.machinelearningservices.LabelClassArgs(\n display_name=\"myLabelClass1\",\n subclasses={},\n ),\n \"myLabelClass2\": azure_native.machinelearningservices.LabelClassArgs(\n display_name=\"myLabelClass2\",\n subclasses={},\n ),\n },\n display_name=\"myCategory2Title\",\n multi_select=\"Disabled\",\n ),\n },\n labeling_job_media_properties=azure_native.machinelearningservices.LabelingJobImagePropertiesArgs(\n media_type=\"Image\",\n ),\n ml_assist_configuration=azure_native.machinelearningservices.MLAssistConfigurationEnabledArgs(\n inferencing_compute_binding=\"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute\",\n ml_assist=\"Enabled\",\n training_compute_binding=\"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute\",\n ),\n properties={\n \"additionalProp1\": \"string\",\n \"additionalProp2\": \"string\",\n \"additionalProp3\": \"string\",\n },\n tags={\n \"additionalProp1\": \"string\",\n \"additionalProp2\": \"string\",\n \"additionalProp3\": \"string\",\n },\n ),\n resource_group_name=\"workspace-1234\",\n workspace_name=\"testworkspace\")\n\n```\n\n```yaml\nresources:\n labelingJob:\n type: azure-native:machinelearningservices:LabelingJob\n properties:\n id: testLabelingJob\n labelingJobProperties:\n description: string\n jobInstructions:\n uri: link/to/instructions\n jobType: Labeling\n labelCategories:\n myCategory1:\n classes:\n myLabelClass1:\n displayName: myLabelClass1\n subclasses: {}\n myLabelClass2:\n displayName: myLabelClass2\n subclasses: {}\n displayName: myCategory1Title\n multiSelect: Disabled\n myCategory2:\n classes:\n myLabelClass1:\n displayName: myLabelClass1\n subclasses: {}\n myLabelClass2:\n displayName: myLabelClass2\n subclasses: {}\n displayName: myCategory2Title\n multiSelect: Disabled\n labelingJobMediaProperties:\n mediaType: Image\n mlAssistConfiguration:\n inferencingComputeBinding: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute\n mlAssist: Enabled\n trainingComputeBinding: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute\n properties:\n additionalProp1: string\n additionalProp2: string\n additionalProp3: string\n tags:\n additionalProp1: string\n additionalProp2: string\n additionalProp3: string\n resourceGroupName: workspace-1234\n workspaceName: testworkspace\n\n```\n\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nAn existing resource can be imported using its type token, name, and identifier, e.g.\n\n```sh\n$ pulumi import azure-native:machinelearningservices:LabelingJob testLabelingJob /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id} \n```\n", "properties": { "labelingJobProperties": { "type": "object", @@ -726526,6 +727203,161 @@ ] } }, + "azure-native:authorization:getRoleManagementPolicy": { + "description": "Get the specified role management policy for a resource scope\nAzure REST API version: 2020-10-01.\n\nOther available API versions: 2020-10-01-preview.", + "inputs": { + "properties": { + "roleManagementPolicyName": { + "type": "string", + "description": "The name (guid) of the role management policy to get.", + "willReplaceOnChanges": true + }, + "scope": { + "type": "string", + "description": "The scope of the role management policy.", + "willReplaceOnChanges": true + } + }, + "type": "object", + "required": [ + "roleManagementPolicyName", + "scope" + ] + }, + "outputs": { + "description": "Role management policy", + "properties": { + "description": { + "type": "string", + "description": "The role management policy description." + }, + "displayName": { + "type": "string", + "description": "The role management policy display name." + }, + "effectiveRules": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyApprovalRuleResponse" + }, + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyAuthenticationContextRuleResponse" + }, + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyEnablementRuleResponse" + }, + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyExpirationRuleResponse" + }, + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyNotificationRuleResponse" + } + ], + "discriminator": { + "propertyName": "ruleType", + "mapping": { + "RoleManagementPolicyApprovalRule": "#/types/azure-native:authorization:RoleManagementPolicyApprovalRuleResponse", + "RoleManagementPolicyAuthenticationContextRule": "#/types/azure-native:authorization:RoleManagementPolicyAuthenticationContextRuleResponse", + "RoleManagementPolicyEnablementRule": "#/types/azure-native:authorization:RoleManagementPolicyEnablementRuleResponse", + "RoleManagementPolicyExpirationRule": "#/types/azure-native:authorization:RoleManagementPolicyExpirationRuleResponse", + "RoleManagementPolicyNotificationRule": "#/types/azure-native:authorization:RoleManagementPolicyNotificationRuleResponse" + } + } + }, + "description": "The readonly computed rule applied to the policy." + }, + "id": { + "type": "string", + "description": "The role management policy Id." + }, + "isOrganizationDefault": { + "type": "boolean", + "description": "The role management policy is default policy." + }, + "lastModifiedBy": { + "type": "object", + "$ref": "#/types/azure-native:authorization:PrincipalResponse", + "description": "The name of the entity last modified it" + }, + "lastModifiedDateTime": { + "type": "string", + "description": "The last modified date time." + }, + "name": { + "type": "string", + "description": "The role management policy name." + }, + "policyProperties": { + "type": "object", + "$ref": "#/types/azure-native:authorization:PolicyPropertiesResponse", + "description": "Additional properties of scope" + }, + "rules": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyApprovalRuleResponse" + }, + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyAuthenticationContextRuleResponse" + }, + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyEnablementRuleResponse" + }, + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyExpirationRuleResponse" + }, + { + "type": "object", + "$ref": "#/types/azure-native:authorization:RoleManagementPolicyNotificationRuleResponse" + } + ], + "discriminator": { + "propertyName": "ruleType", + "mapping": { + "RoleManagementPolicyApprovalRule": "#/types/azure-native:authorization:RoleManagementPolicyApprovalRuleResponse", + "RoleManagementPolicyAuthenticationContextRule": "#/types/azure-native:authorization:RoleManagementPolicyAuthenticationContextRuleResponse", + "RoleManagementPolicyEnablementRule": "#/types/azure-native:authorization:RoleManagementPolicyEnablementRuleResponse", + "RoleManagementPolicyExpirationRule": "#/types/azure-native:authorization:RoleManagementPolicyExpirationRuleResponse", + "RoleManagementPolicyNotificationRule": "#/types/azure-native:authorization:RoleManagementPolicyNotificationRuleResponse" + } + } + }, + "description": "The rule applied to the policy." + }, + "scope": { + "type": "string", + "description": "The role management policy scope." + }, + "type": { + "type": "string", + "description": "The role management policy type." + } + }, + "type": "object", + "required": [ + "effectiveRules", + "id", + "lastModifiedBy", + "lastModifiedDateTime", + "name", + "policyProperties", + "type" + ] + } + }, "azure-native:authorization:getRoleManagementPolicyAssignment": { "description": "Get the specified role management policy assignment for a resource scope\nAzure REST API version: 2020-10-01.\n\nOther available API versions: 2020-10-01-preview.", "inputs": { diff --git a/sdk/dotnet/Authorization/Enums.cs b/sdk/dotnet/Authorization/Enums.cs index 022b9075a77d..cb6bdefdfe34 100644 --- a/sdk/dotnet/Authorization/Enums.cs +++ b/sdk/dotnet/Authorization/Enums.cs @@ -104,6 +104,39 @@ private AccessReviewResult(string value) public override string ToString() => _value; } + /// + /// The type of rule + /// + [EnumType] + public readonly struct ApprovalMode : IEquatable + { + private readonly string _value; + + private ApprovalMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + public static ApprovalMode SingleStage { get; } = new ApprovalMode("SingleStage"); + public static ApprovalMode Serial { get; } = new ApprovalMode("Serial"); + public static ApprovalMode Parallel { get; } = new ApprovalMode("Parallel"); + public static ApprovalMode NoApproval { get; } = new ApprovalMode("NoApproval"); + + public static bool operator ==(ApprovalMode left, ApprovalMode right) => left.Equals(right); + public static bool operator !=(ApprovalMode left, ApprovalMode right) => !left.Equals(right); + + public static explicit operator string(ApprovalMode value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is ApprovalMode other && Equals(other); + public bool Equals(ApprovalMode other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } + /// /// The option whether validate the exemption is at or under the assignment scope. /// @@ -173,6 +206,38 @@ private DefaultDecisionType(string value) public override string ToString() => _value; } + /// + /// The type of enablement rule + /// + [EnumType] + public readonly struct EnablementRules : IEquatable + { + private readonly string _value; + + private EnablementRules(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + public static EnablementRules MultiFactorAuthentication { get; } = new EnablementRules("MultiFactorAuthentication"); + public static EnablementRules Justification { get; } = new EnablementRules("Justification"); + public static EnablementRules Ticketing { get; } = new EnablementRules("Ticketing"); + + public static bool operator ==(EnablementRules left, EnablementRules right) => left.Equals(right); + public static bool operator !=(EnablementRules left, EnablementRules right) => !left.Equals(right); + + public static explicit operator string(EnablementRules value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is EnablementRules other && Equals(other); + public bool Equals(EnablementRules other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } + /// /// The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. /// @@ -279,6 +344,68 @@ private LockLevel(string value) public override string ToString() => _value; } + /// + /// The type of notification. + /// + [EnumType] + public readonly struct NotificationDeliveryMechanism : IEquatable + { + private readonly string _value; + + private NotificationDeliveryMechanism(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + public static NotificationDeliveryMechanism Email { get; } = new NotificationDeliveryMechanism("Email"); + + public static bool operator ==(NotificationDeliveryMechanism left, NotificationDeliveryMechanism right) => left.Equals(right); + public static bool operator !=(NotificationDeliveryMechanism left, NotificationDeliveryMechanism right) => !left.Equals(right); + + public static explicit operator string(NotificationDeliveryMechanism value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is NotificationDeliveryMechanism other && Equals(other); + public bool Equals(NotificationDeliveryMechanism other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } + + /// + /// The notification level. + /// + [EnumType] + public readonly struct NotificationLevel : IEquatable + { + private readonly string _value; + + private NotificationLevel(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + public static NotificationLevel None { get; } = new NotificationLevel("None"); + public static NotificationLevel Critical { get; } = new NotificationLevel("Critical"); + public static NotificationLevel All { get; } = new NotificationLevel("All"); + + public static bool operator ==(NotificationLevel left, NotificationLevel right) => left.Equals(right); + public static bool operator !=(NotificationLevel left, NotificationLevel right) => !left.Equals(right); + + public static explicit operator string(NotificationLevel value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is NotificationLevel other && Equals(other); + public bool Equals(NotificationLevel other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } + /// /// The override kind. /// @@ -443,6 +570,38 @@ private PublicNetworkAccessOptions(string value) public override string ToString() => _value; } + /// + /// The recipient type. + /// + [EnumType] + public readonly struct RecipientType : IEquatable + { + private readonly string _value; + + private RecipientType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + public static RecipientType Requestor { get; } = new RecipientType("Requestor"); + public static RecipientType Approver { get; } = new RecipientType("Approver"); + public static RecipientType Admin { get; } = new RecipientType("Admin"); + + public static bool operator ==(RecipientType left, RecipientType right) => left.Equals(right); + public static bool operator !=(RecipientType left, RecipientType right) => !left.Equals(right); + + public static explicit operator string(RecipientType value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is RecipientType other && Equals(other); + public bool Equals(RecipientType other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } + /// /// The identity type. This is the only required field when adding a system or user assigned identity to a resource. /// @@ -484,6 +643,40 @@ private ResourceIdentityType(string value) public override string ToString() => _value; } + /// + /// The type of rule + /// + [EnumType] + public readonly struct RoleManagementPolicyRuleType : IEquatable + { + private readonly string _value; + + private RoleManagementPolicyRuleType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + public static RoleManagementPolicyRuleType RoleManagementPolicyApprovalRule { get; } = new RoleManagementPolicyRuleType("RoleManagementPolicyApprovalRule"); + public static RoleManagementPolicyRuleType RoleManagementPolicyAuthenticationContextRule { get; } = new RoleManagementPolicyRuleType("RoleManagementPolicyAuthenticationContextRule"); + public static RoleManagementPolicyRuleType RoleManagementPolicyEnablementRule { get; } = new RoleManagementPolicyRuleType("RoleManagementPolicyEnablementRule"); + public static RoleManagementPolicyRuleType RoleManagementPolicyExpirationRule { get; } = new RoleManagementPolicyRuleType("RoleManagementPolicyExpirationRule"); + public static RoleManagementPolicyRuleType RoleManagementPolicyNotificationRule { get; } = new RoleManagementPolicyRuleType("RoleManagementPolicyNotificationRule"); + + public static bool operator ==(RoleManagementPolicyRuleType left, RoleManagementPolicyRuleType right) => left.Equals(right); + public static bool operator !=(RoleManagementPolicyRuleType left, RoleManagementPolicyRuleType right) => !left.Equals(right); + + public static explicit operator string(RoleManagementPolicyRuleType value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is RoleManagementPolicyRuleType other && Equals(other); + public bool Equals(RoleManagementPolicyRuleType other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } + /// /// The selector kind. /// @@ -528,4 +721,35 @@ private SelectorKind(string value) public override string ToString() => _value; } + + /// + /// The type of user. + /// + [EnumType] + public readonly struct UserType : IEquatable + { + private readonly string _value; + + private UserType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + public static UserType User { get; } = new UserType("User"); + public static UserType Group { get; } = new UserType("Group"); + + public static bool operator ==(UserType left, UserType right) => left.Equals(right); + public static bool operator !=(UserType left, UserType right) => !left.Equals(right); + + public static explicit operator string(UserType value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is UserType other && Equals(other); + public bool Equals(UserType other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } } diff --git a/sdk/dotnet/Authorization/GetRoleManagementPolicy.cs b/sdk/dotnet/Authorization/GetRoleManagementPolicy.cs new file mode 100644 index 000000000000..37a15f0a647e --- /dev/null +++ b/sdk/dotnet/Authorization/GetRoleManagementPolicy.cs @@ -0,0 +1,167 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization +{ + public static class GetRoleManagementPolicy + { + /// + /// Get the specified role management policy for a resource scope + /// Azure REST API version: 2020-10-01. + /// + /// Other available API versions: 2020-10-01-preview. + /// + public static Task InvokeAsync(GetRoleManagementPolicyArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.InvokeAsync("azure-native:authorization:getRoleManagementPolicy", args ?? new GetRoleManagementPolicyArgs(), options.WithDefaults()); + + /// + /// Get the specified role management policy for a resource scope + /// Azure REST API version: 2020-10-01. + /// + /// Other available API versions: 2020-10-01-preview. + /// + public static Output Invoke(GetRoleManagementPolicyInvokeArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.Invoke("azure-native:authorization:getRoleManagementPolicy", args ?? new GetRoleManagementPolicyInvokeArgs(), options.WithDefaults()); + } + + + public sealed class GetRoleManagementPolicyArgs : global::Pulumi.InvokeArgs + { + /// + /// The name (guid) of the role management policy to get. + /// + [Input("roleManagementPolicyName", required: true)] + public string RoleManagementPolicyName { get; set; } = null!; + + /// + /// The scope of the role management policy. + /// + [Input("scope", required: true)] + public string Scope { get; set; } = null!; + + public GetRoleManagementPolicyArgs() + { + } + public static new GetRoleManagementPolicyArgs Empty => new GetRoleManagementPolicyArgs(); + } + + public sealed class GetRoleManagementPolicyInvokeArgs : global::Pulumi.InvokeArgs + { + /// + /// The name (guid) of the role management policy to get. + /// + [Input("roleManagementPolicyName", required: true)] + public Input RoleManagementPolicyName { get; set; } = null!; + + /// + /// The scope of the role management policy. + /// + [Input("scope", required: true)] + public Input Scope { get; set; } = null!; + + public GetRoleManagementPolicyInvokeArgs() + { + } + public static new GetRoleManagementPolicyInvokeArgs Empty => new GetRoleManagementPolicyInvokeArgs(); + } + + + [OutputType] + public sealed class GetRoleManagementPolicyResult + { + /// + /// The role management policy description. + /// + public readonly string? Description; + /// + /// The role management policy display name. + /// + public readonly string? DisplayName; + /// + /// The readonly computed rule applied to the policy. + /// + public readonly ImmutableArray EffectiveRules; + /// + /// The role management policy Id. + /// + public readonly string Id; + /// + /// The role management policy is default policy. + /// + public readonly bool? IsOrganizationDefault; + /// + /// The name of the entity last modified it + /// + public readonly Outputs.PrincipalResponse LastModifiedBy; + /// + /// The last modified date time. + /// + public readonly string LastModifiedDateTime; + /// + /// The role management policy name. + /// + public readonly string Name; + /// + /// Additional properties of scope + /// + public readonly Outputs.PolicyPropertiesResponse PolicyProperties; + /// + /// The rule applied to the policy. + /// + public readonly ImmutableArray Rules; + /// + /// The role management policy scope. + /// + public readonly string? Scope; + /// + /// The role management policy type. + /// + public readonly string Type; + + [OutputConstructor] + private GetRoleManagementPolicyResult( + string? description, + + string? displayName, + + ImmutableArray effectiveRules, + + string id, + + bool? isOrganizationDefault, + + Outputs.PrincipalResponse lastModifiedBy, + + string lastModifiedDateTime, + + string name, + + Outputs.PolicyPropertiesResponse policyProperties, + + ImmutableArray rules, + + string? scope, + + string type) + { + Description = description; + DisplayName = displayName; + EffectiveRules = effectiveRules; + Id = id; + IsOrganizationDefault = isOrganizationDefault; + LastModifiedBy = lastModifiedBy; + LastModifiedDateTime = lastModifiedDateTime; + Name = name; + PolicyProperties = policyProperties; + Rules = rules; + Scope = scope; + Type = type; + } + } +} diff --git a/sdk/dotnet/Authorization/Inputs/ApprovalSettingsArgs.cs b/sdk/dotnet/Authorization/Inputs/ApprovalSettingsArgs.cs new file mode 100644 index 000000000000..d9122bf6f5e1 --- /dev/null +++ b/sdk/dotnet/Authorization/Inputs/ApprovalSettingsArgs.cs @@ -0,0 +1,59 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.Inputs +{ + + /// + /// The approval settings. + /// + public sealed class ApprovalSettingsArgs : global::Pulumi.ResourceArgs + { + /// + /// The type of rule + /// + [Input("approvalMode")] + public InputUnion? ApprovalMode { get; set; } + + [Input("approvalStages")] + private InputList? _approvalStages; + + /// + /// The approval stages of the request. + /// + public InputList ApprovalStages + { + get => _approvalStages ?? (_approvalStages = new InputList()); + set => _approvalStages = value; + } + + /// + /// Determines whether approval is required or not. + /// + [Input("isApprovalRequired")] + public Input? IsApprovalRequired { get; set; } + + /// + /// Determines whether approval is required for assignment extension. + /// + [Input("isApprovalRequiredForExtension")] + public Input? IsApprovalRequiredForExtension { get; set; } + + /// + /// Determine whether requestor justification is required. + /// + [Input("isRequestorJustificationRequired")] + public Input? IsRequestorJustificationRequired { get; set; } + + public ApprovalSettingsArgs() + { + } + public static new ApprovalSettingsArgs Empty => new ApprovalSettingsArgs(); + } +} diff --git a/sdk/dotnet/Authorization/Inputs/ApprovalStageArgs.cs b/sdk/dotnet/Authorization/Inputs/ApprovalStageArgs.cs new file mode 100644 index 000000000000..e6711f18026c --- /dev/null +++ b/sdk/dotnet/Authorization/Inputs/ApprovalStageArgs.cs @@ -0,0 +1,71 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.Inputs +{ + + /// + /// The approval stage. + /// + public sealed class ApprovalStageArgs : global::Pulumi.ResourceArgs + { + /// + /// The time in days when approval request would be timed out + /// + [Input("approvalStageTimeOutInDays")] + public Input? ApprovalStageTimeOutInDays { get; set; } + + [Input("escalationApprovers")] + private InputList? _escalationApprovers; + + /// + /// The escalation approver of the request. + /// + public InputList EscalationApprovers + { + get => _escalationApprovers ?? (_escalationApprovers = new InputList()); + set => _escalationApprovers = value; + } + + /// + /// The time in minutes when the approval request would be escalated if the primary approver does not approve + /// + [Input("escalationTimeInMinutes")] + public Input? EscalationTimeInMinutes { get; set; } + + /// + /// Determines whether approver need to provide justification for his decision. + /// + [Input("isApproverJustificationRequired")] + public Input? IsApproverJustificationRequired { get; set; } + + /// + /// The value determine whether escalation feature is enabled. + /// + [Input("isEscalationEnabled")] + public Input? IsEscalationEnabled { get; set; } + + [Input("primaryApprovers")] + private InputList? _primaryApprovers; + + /// + /// The primary approver of the request. + /// + public InputList PrimaryApprovers + { + get => _primaryApprovers ?? (_primaryApprovers = new InputList()); + set => _primaryApprovers = value; + } + + public ApprovalStageArgs() + { + } + public static new ApprovalStageArgs Empty => new ApprovalStageArgs(); + } +} diff --git a/sdk/dotnet/Authorization/Inputs/RoleManagementPolicyApprovalRuleArgs.cs b/sdk/dotnet/Authorization/Inputs/RoleManagementPolicyApprovalRuleArgs.cs new file mode 100644 index 000000000000..8ce48abab677 --- /dev/null +++ b/sdk/dotnet/Authorization/Inputs/RoleManagementPolicyApprovalRuleArgs.cs @@ -0,0 +1,48 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.Inputs +{ + + /// + /// The role management policy approval rule. + /// + public sealed class RoleManagementPolicyApprovalRuleArgs : global::Pulumi.ResourceArgs + { + /// + /// The id of the rule. + /// + [Input("id")] + public Input? Id { get; set; } + + /// + /// The type of rule + /// Expected value is 'RoleManagementPolicyApprovalRule'. + /// + [Input("ruleType", required: true)] + public Input RuleType { get; set; } = null!; + + /// + /// The approval setting + /// + [Input("setting")] + public Input? Setting { get; set; } + + /// + /// The target of the current rule. + /// + [Input("target")] + public Input? Target { get; set; } + + public RoleManagementPolicyApprovalRuleArgs() + { + } + public static new RoleManagementPolicyApprovalRuleArgs Empty => new RoleManagementPolicyApprovalRuleArgs(); + } +} diff --git a/sdk/dotnet/Authorization/Inputs/RoleManagementPolicyAuthenticationContextRuleArgs.cs b/sdk/dotnet/Authorization/Inputs/RoleManagementPolicyAuthenticationContextRuleArgs.cs new file mode 100644 index 000000000000..7f1859bcfd7f --- /dev/null +++ b/sdk/dotnet/Authorization/Inputs/RoleManagementPolicyAuthenticationContextRuleArgs.cs @@ -0,0 +1,54 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.Inputs +{ + + /// + /// The role management policy authentication context rule. + /// + public sealed class RoleManagementPolicyAuthenticationContextRuleArgs : global::Pulumi.ResourceArgs + { + /// + /// The claim value. + /// + [Input("claimValue")] + public Input? ClaimValue { get; set; } + + /// + /// The id of the rule. + /// + [Input("id")] + public Input? Id { get; set; } + + /// + /// The value indicating if rule is enabled. + /// + [Input("isEnabled")] + public Input? IsEnabled { get; set; } + + /// + /// The type of rule + /// Expected value is 'RoleManagementPolicyAuthenticationContextRule'. + /// + [Input("ruleType", required: true)] + public Input RuleType { get; set; } = null!; + + /// + /// The target of the current rule. + /// + [Input("target")] + public Input? Target { get; set; } + + public RoleManagementPolicyAuthenticationContextRuleArgs() + { + } + public static new RoleManagementPolicyAuthenticationContextRuleArgs Empty => new RoleManagementPolicyAuthenticationContextRuleArgs(); + } +} diff --git a/sdk/dotnet/Authorization/Inputs/RoleManagementPolicyEnablementRuleArgs.cs b/sdk/dotnet/Authorization/Inputs/RoleManagementPolicyEnablementRuleArgs.cs new file mode 100644 index 000000000000..a9d547029564 --- /dev/null +++ b/sdk/dotnet/Authorization/Inputs/RoleManagementPolicyEnablementRuleArgs.cs @@ -0,0 +1,54 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.Inputs +{ + + /// + /// The role management policy enablement rule. + /// + public sealed class RoleManagementPolicyEnablementRuleArgs : global::Pulumi.ResourceArgs + { + [Input("enabledRules")] + private InputList>? _enabledRules; + + /// + /// The list of enabled rules. + /// + public InputList> EnabledRules + { + get => _enabledRules ?? (_enabledRules = new InputList>()); + set => _enabledRules = value; + } + + /// + /// The id of the rule. + /// + [Input("id")] + public Input? Id { get; set; } + + /// + /// The type of rule + /// Expected value is 'RoleManagementPolicyEnablementRule'. + /// + [Input("ruleType", required: true)] + public Input RuleType { get; set; } = null!; + + /// + /// The target of the current rule. + /// + [Input("target")] + public Input? Target { get; set; } + + public RoleManagementPolicyEnablementRuleArgs() + { + } + public static new RoleManagementPolicyEnablementRuleArgs Empty => new RoleManagementPolicyEnablementRuleArgs(); + } +} diff --git a/sdk/dotnet/Authorization/Inputs/RoleManagementPolicyExpirationRuleArgs.cs b/sdk/dotnet/Authorization/Inputs/RoleManagementPolicyExpirationRuleArgs.cs new file mode 100644 index 000000000000..189a1b4c843b --- /dev/null +++ b/sdk/dotnet/Authorization/Inputs/RoleManagementPolicyExpirationRuleArgs.cs @@ -0,0 +1,54 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.Inputs +{ + + /// + /// The role management policy expiration rule. + /// + public sealed class RoleManagementPolicyExpirationRuleArgs : global::Pulumi.ResourceArgs + { + /// + /// The id of the rule. + /// + [Input("id")] + public Input? Id { get; set; } + + /// + /// The value indicating whether expiration is required. + /// + [Input("isExpirationRequired")] + public Input? IsExpirationRequired { get; set; } + + /// + /// The maximum duration of expiration in timespan. + /// + [Input("maximumDuration")] + public Input? MaximumDuration { get; set; } + + /// + /// The type of rule + /// Expected value is 'RoleManagementPolicyExpirationRule'. + /// + [Input("ruleType", required: true)] + public Input RuleType { get; set; } = null!; + + /// + /// The target of the current rule. + /// + [Input("target")] + public Input? Target { get; set; } + + public RoleManagementPolicyExpirationRuleArgs() + { + } + public static new RoleManagementPolicyExpirationRuleArgs Empty => new RoleManagementPolicyExpirationRuleArgs(); + } +} diff --git a/sdk/dotnet/Authorization/Inputs/RoleManagementPolicyNotificationRuleArgs.cs b/sdk/dotnet/Authorization/Inputs/RoleManagementPolicyNotificationRuleArgs.cs new file mode 100644 index 000000000000..0d2170ee720e --- /dev/null +++ b/sdk/dotnet/Authorization/Inputs/RoleManagementPolicyNotificationRuleArgs.cs @@ -0,0 +1,78 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.Inputs +{ + + /// + /// The role management policy notification rule. + /// + public sealed class RoleManagementPolicyNotificationRuleArgs : global::Pulumi.ResourceArgs + { + /// + /// The id of the rule. + /// + [Input("id")] + public Input? Id { get; set; } + + /// + /// Determines if the notification will be sent to the recipient type specified in the policy rule. + /// + [Input("isDefaultRecipientsEnabled")] + public Input? IsDefaultRecipientsEnabled { get; set; } + + /// + /// The notification level. + /// + [Input("notificationLevel")] + public InputUnion? NotificationLevel { get; set; } + + [Input("notificationRecipients")] + private InputList? _notificationRecipients; + + /// + /// The list of notification recipients. + /// + public InputList NotificationRecipients + { + get => _notificationRecipients ?? (_notificationRecipients = new InputList()); + set => _notificationRecipients = value; + } + + /// + /// The type of notification. + /// + [Input("notificationType")] + public InputUnion? NotificationType { get; set; } + + /// + /// The recipient type. + /// + [Input("recipientType")] + public InputUnion? RecipientType { get; set; } + + /// + /// The type of rule + /// Expected value is 'RoleManagementPolicyNotificationRule'. + /// + [Input("ruleType", required: true)] + public Input RuleType { get; set; } = null!; + + /// + /// The target of the current rule. + /// + [Input("target")] + public Input? Target { get; set; } + + public RoleManagementPolicyNotificationRuleArgs() + { + } + public static new RoleManagementPolicyNotificationRuleArgs Empty => new RoleManagementPolicyNotificationRuleArgs(); + } +} diff --git a/sdk/dotnet/Authorization/Inputs/RoleManagementPolicyRuleTargetArgs.cs b/sdk/dotnet/Authorization/Inputs/RoleManagementPolicyRuleTargetArgs.cs new file mode 100644 index 000000000000..b4cb355d1c1f --- /dev/null +++ b/sdk/dotnet/Authorization/Inputs/RoleManagementPolicyRuleTargetArgs.cs @@ -0,0 +1,83 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.Inputs +{ + + /// + /// The role management policy rule target. + /// + public sealed class RoleManagementPolicyRuleTargetArgs : global::Pulumi.ResourceArgs + { + /// + /// The caller of the setting. + /// + [Input("caller")] + public Input? Caller { get; set; } + + [Input("enforcedSettings")] + private InputList? _enforcedSettings; + + /// + /// The list of enforced settings. + /// + public InputList EnforcedSettings + { + get => _enforcedSettings ?? (_enforcedSettings = new InputList()); + set => _enforcedSettings = value; + } + + [Input("inheritableSettings")] + private InputList? _inheritableSettings; + + /// + /// The list of inheritable settings. + /// + public InputList InheritableSettings + { + get => _inheritableSettings ?? (_inheritableSettings = new InputList()); + set => _inheritableSettings = value; + } + + /// + /// The assignment level to which rule is applied. + /// + [Input("level")] + public Input? Level { get; set; } + + [Input("operations")] + private InputList? _operations; + + /// + /// The type of operation. + /// + public InputList Operations + { + get => _operations ?? (_operations = new InputList()); + set => _operations = value; + } + + [Input("targetObjects")] + private InputList? _targetObjects; + + /// + /// The list of target objects. + /// + public InputList TargetObjects + { + get => _targetObjects ?? (_targetObjects = new InputList()); + set => _targetObjects = value; + } + + public RoleManagementPolicyRuleTargetArgs() + { + } + public static new RoleManagementPolicyRuleTargetArgs Empty => new RoleManagementPolicyRuleTargetArgs(); + } +} diff --git a/sdk/dotnet/Authorization/Inputs/UserSetArgs.cs b/sdk/dotnet/Authorization/Inputs/UserSetArgs.cs new file mode 100644 index 000000000000..7e5ddf617193 --- /dev/null +++ b/sdk/dotnet/Authorization/Inputs/UserSetArgs.cs @@ -0,0 +1,47 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.Inputs +{ + + /// + /// The detail of a user. + /// + public sealed class UserSetArgs : global::Pulumi.ResourceArgs + { + /// + /// The description of the user. + /// + [Input("description")] + public Input? Description { get; set; } + + /// + /// The object id of the user. + /// + [Input("id")] + public Input? Id { get; set; } + + /// + /// The value indicating whether the user is a backup fallback approver + /// + [Input("isBackup")] + public Input? IsBackup { get; set; } + + /// + /// The type of user. + /// + [Input("userType")] + public InputUnion? UserType { get; set; } + + public UserSetArgs() + { + } + public static new UserSetArgs Empty => new UserSetArgs(); + } +} diff --git a/sdk/dotnet/Authorization/Outputs/PolicyPropertiesResponse.cs b/sdk/dotnet/Authorization/Outputs/PolicyPropertiesResponse.cs new file mode 100644 index 000000000000..7ff55a8efac2 --- /dev/null +++ b/sdk/dotnet/Authorization/Outputs/PolicyPropertiesResponse.cs @@ -0,0 +1,30 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.Outputs +{ + + /// + /// Expanded info of resource scope + /// + [OutputType] + public sealed class PolicyPropertiesResponse + { + /// + /// Details of the resource scope + /// + public readonly Outputs.PolicyPropertiesResponseScope Scope; + + [OutputConstructor] + private PolicyPropertiesResponse(Outputs.PolicyPropertiesResponseScope scope) + { + Scope = scope; + } + } +} diff --git a/sdk/dotnet/Authorization/Outputs/PolicyPropertiesResponseScope.cs b/sdk/dotnet/Authorization/Outputs/PolicyPropertiesResponseScope.cs new file mode 100644 index 000000000000..1163e7706e17 --- /dev/null +++ b/sdk/dotnet/Authorization/Outputs/PolicyPropertiesResponseScope.cs @@ -0,0 +1,45 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.Outputs +{ + + /// + /// Details of the resource scope + /// + [OutputType] + public sealed class PolicyPropertiesResponseScope + { + /// + /// Display name of the resource + /// + public readonly string? DisplayName; + /// + /// Scope id of the resource + /// + public readonly string? Id; + /// + /// Type of the resource + /// + public readonly string? Type; + + [OutputConstructor] + private PolicyPropertiesResponseScope( + string? displayName, + + string? id, + + string? type) + { + DisplayName = displayName; + Id = id; + Type = type; + } + } +} diff --git a/sdk/dotnet/Authorization/RoleManagementPolicy.cs b/sdk/dotnet/Authorization/RoleManagementPolicy.cs new file mode 100644 index 000000000000..c78e8a02d01c --- /dev/null +++ b/sdk/dotnet/Authorization/RoleManagementPolicy.cs @@ -0,0 +1,184 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization +{ + /// + /// Role management policy + /// Azure REST API version: 2020-10-01. + /// + /// Other available API versions: 2020-10-01-preview. + /// + [AzureNativeResourceType("azure-native:authorization:RoleManagementPolicy")] + public partial class RoleManagementPolicy : global::Pulumi.CustomResource + { + /// + /// The role management policy description. + /// + [Output("description")] + public Output Description { get; private set; } = null!; + + /// + /// The role management policy display name. + /// + [Output("displayName")] + public Output DisplayName { get; private set; } = null!; + + /// + /// The readonly computed rule applied to the policy. + /// + [Output("effectiveRules")] + public Output> EffectiveRules { get; private set; } = null!; + + /// + /// The role management policy is default policy. + /// + [Output("isOrganizationDefault")] + public Output IsOrganizationDefault { get; private set; } = null!; + + /// + /// The name of the entity last modified it + /// + [Output("lastModifiedBy")] + public Output LastModifiedBy { get; private set; } = null!; + + /// + /// The last modified date time. + /// + [Output("lastModifiedDateTime")] + public Output LastModifiedDateTime { get; private set; } = null!; + + /// + /// The role management policy name. + /// + [Output("name")] + public Output Name { get; private set; } = null!; + + /// + /// Additional properties of scope + /// + [Output("policyProperties")] + public Output PolicyProperties { get; private set; } = null!; + + /// + /// The rule applied to the policy. + /// + [Output("rules")] + public Output> Rules { get; private set; } = null!; + + /// + /// The role management policy scope. + /// + [Output("scope")] + public Output Scope { get; private set; } = null!; + + /// + /// The role management policy type. + /// + [Output("type")] + public Output Type { get; private set; } = null!; + + + /// + /// Create a RoleManagementPolicy resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public RoleManagementPolicy(string name, RoleManagementPolicyArgs args, CustomResourceOptions? options = null) + : base("azure-native:authorization:RoleManagementPolicy", name, args ?? new RoleManagementPolicyArgs(), MakeResourceOptions(options, "")) + { + } + + private RoleManagementPolicy(string name, Input id, CustomResourceOptions? options = null) + : base("azure-native:authorization:RoleManagementPolicy", name, null, MakeResourceOptions(options, id)) + { + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + Aliases = + { + new global::Pulumi.Alias { Type = "azure-native:authorization/v20201001:RoleManagementPolicy" }, + new global::Pulumi.Alias { Type = "azure-native:authorization/v20201001preview:RoleManagementPolicy" }, + }, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing RoleManagementPolicy resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// A bag of options that control this resource's behavior + public static RoleManagementPolicy Get(string name, Input id, CustomResourceOptions? options = null) + { + return new RoleManagementPolicy(name, id, options); + } + } + + public sealed class RoleManagementPolicyArgs : global::Pulumi.ResourceArgs + { + /// + /// The role management policy description. + /// + [Input("description")] + public Input? Description { get; set; } + + /// + /// The role management policy display name. + /// + [Input("displayName")] + public Input? DisplayName { get; set; } + + /// + /// The role management policy is default policy. + /// + [Input("isOrganizationDefault")] + public Input? IsOrganizationDefault { get; set; } + + /// + /// The name (guid) of the role management policy to upsert. + /// + [Input("roleManagementPolicyName")] + public Input? RoleManagementPolicyName { get; set; } + + [Input("rules")] + private InputList? _rules; + + /// + /// The rule applied to the policy. + /// + public InputList Rules + { + get => _rules ?? (_rules = new InputList()); + set => _rules = value; + } + + /// + /// The role management policy scope. + /// + [Input("scope", required: true)] + public Input Scope { get; set; } = null!; + + public RoleManagementPolicyArgs() + { + } + public static new RoleManagementPolicyArgs Empty => new RoleManagementPolicyArgs(); + } +} diff --git a/sdk/dotnet/Authorization/V20201001/Enums.cs b/sdk/dotnet/Authorization/V20201001/Enums.cs new file mode 100644 index 000000000000..6368985615d7 --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001/Enums.cs @@ -0,0 +1,233 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.ComponentModel; +using Pulumi; + +namespace Pulumi.AzureNative.Authorization.V20201001 +{ + /// + /// The type of rule + /// + [EnumType] + public readonly struct ApprovalMode : IEquatable + { + private readonly string _value; + + private ApprovalMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + public static ApprovalMode SingleStage { get; } = new ApprovalMode("SingleStage"); + public static ApprovalMode Serial { get; } = new ApprovalMode("Serial"); + public static ApprovalMode Parallel { get; } = new ApprovalMode("Parallel"); + public static ApprovalMode NoApproval { get; } = new ApprovalMode("NoApproval"); + + public static bool operator ==(ApprovalMode left, ApprovalMode right) => left.Equals(right); + public static bool operator !=(ApprovalMode left, ApprovalMode right) => !left.Equals(right); + + public static explicit operator string(ApprovalMode value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is ApprovalMode other && Equals(other); + public bool Equals(ApprovalMode other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } + + /// + /// The type of enablement rule + /// + [EnumType] + public readonly struct EnablementRules : IEquatable + { + private readonly string _value; + + private EnablementRules(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + public static EnablementRules MultiFactorAuthentication { get; } = new EnablementRules("MultiFactorAuthentication"); + public static EnablementRules Justification { get; } = new EnablementRules("Justification"); + public static EnablementRules Ticketing { get; } = new EnablementRules("Ticketing"); + + public static bool operator ==(EnablementRules left, EnablementRules right) => left.Equals(right); + public static bool operator !=(EnablementRules left, EnablementRules right) => !left.Equals(right); + + public static explicit operator string(EnablementRules value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is EnablementRules other && Equals(other); + public bool Equals(EnablementRules other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } + + /// + /// The type of notification. + /// + [EnumType] + public readonly struct NotificationDeliveryMechanism : IEquatable + { + private readonly string _value; + + private NotificationDeliveryMechanism(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + public static NotificationDeliveryMechanism Email { get; } = new NotificationDeliveryMechanism("Email"); + + public static bool operator ==(NotificationDeliveryMechanism left, NotificationDeliveryMechanism right) => left.Equals(right); + public static bool operator !=(NotificationDeliveryMechanism left, NotificationDeliveryMechanism right) => !left.Equals(right); + + public static explicit operator string(NotificationDeliveryMechanism value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is NotificationDeliveryMechanism other && Equals(other); + public bool Equals(NotificationDeliveryMechanism other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } + + /// + /// The notification level. + /// + [EnumType] + public readonly struct NotificationLevel : IEquatable + { + private readonly string _value; + + private NotificationLevel(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + public static NotificationLevel None { get; } = new NotificationLevel("None"); + public static NotificationLevel Critical { get; } = new NotificationLevel("Critical"); + public static NotificationLevel All { get; } = new NotificationLevel("All"); + + public static bool operator ==(NotificationLevel left, NotificationLevel right) => left.Equals(right); + public static bool operator !=(NotificationLevel left, NotificationLevel right) => !left.Equals(right); + + public static explicit operator string(NotificationLevel value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is NotificationLevel other && Equals(other); + public bool Equals(NotificationLevel other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } + + /// + /// The recipient type. + /// + [EnumType] + public readonly struct RecipientType : IEquatable + { + private readonly string _value; + + private RecipientType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + public static RecipientType Requestor { get; } = new RecipientType("Requestor"); + public static RecipientType Approver { get; } = new RecipientType("Approver"); + public static RecipientType Admin { get; } = new RecipientType("Admin"); + + public static bool operator ==(RecipientType left, RecipientType right) => left.Equals(right); + public static bool operator !=(RecipientType left, RecipientType right) => !left.Equals(right); + + public static explicit operator string(RecipientType value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is RecipientType other && Equals(other); + public bool Equals(RecipientType other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } + + /// + /// The type of rule + /// + [EnumType] + public readonly struct RoleManagementPolicyRuleType : IEquatable + { + private readonly string _value; + + private RoleManagementPolicyRuleType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + public static RoleManagementPolicyRuleType RoleManagementPolicyApprovalRule { get; } = new RoleManagementPolicyRuleType("RoleManagementPolicyApprovalRule"); + public static RoleManagementPolicyRuleType RoleManagementPolicyAuthenticationContextRule { get; } = new RoleManagementPolicyRuleType("RoleManagementPolicyAuthenticationContextRule"); + public static RoleManagementPolicyRuleType RoleManagementPolicyEnablementRule { get; } = new RoleManagementPolicyRuleType("RoleManagementPolicyEnablementRule"); + public static RoleManagementPolicyRuleType RoleManagementPolicyExpirationRule { get; } = new RoleManagementPolicyRuleType("RoleManagementPolicyExpirationRule"); + public static RoleManagementPolicyRuleType RoleManagementPolicyNotificationRule { get; } = new RoleManagementPolicyRuleType("RoleManagementPolicyNotificationRule"); + + public static bool operator ==(RoleManagementPolicyRuleType left, RoleManagementPolicyRuleType right) => left.Equals(right); + public static bool operator !=(RoleManagementPolicyRuleType left, RoleManagementPolicyRuleType right) => !left.Equals(right); + + public static explicit operator string(RoleManagementPolicyRuleType value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is RoleManagementPolicyRuleType other && Equals(other); + public bool Equals(RoleManagementPolicyRuleType other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } + + /// + /// The type of user. + /// + [EnumType] + public readonly struct UserType : IEquatable + { + private readonly string _value; + + private UserType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + public static UserType User { get; } = new UserType("User"); + public static UserType Group { get; } = new UserType("Group"); + + public static bool operator ==(UserType left, UserType right) => left.Equals(right); + public static bool operator !=(UserType left, UserType right) => !left.Equals(right); + + public static explicit operator string(UserType value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is UserType other && Equals(other); + public bool Equals(UserType other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } +} diff --git a/sdk/dotnet/Authorization/V20201001/GetRoleManagementPolicy.cs b/sdk/dotnet/Authorization/V20201001/GetRoleManagementPolicy.cs new file mode 100644 index 000000000000..da8676a6c913 --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001/GetRoleManagementPolicy.cs @@ -0,0 +1,161 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001 +{ + public static class GetRoleManagementPolicy + { + /// + /// Get the specified role management policy for a resource scope + /// + public static Task InvokeAsync(GetRoleManagementPolicyArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.InvokeAsync("azure-native:authorization/v20201001:getRoleManagementPolicy", args ?? new GetRoleManagementPolicyArgs(), options.WithDefaults()); + + /// + /// Get the specified role management policy for a resource scope + /// + public static Output Invoke(GetRoleManagementPolicyInvokeArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.Invoke("azure-native:authorization/v20201001:getRoleManagementPolicy", args ?? new GetRoleManagementPolicyInvokeArgs(), options.WithDefaults()); + } + + + public sealed class GetRoleManagementPolicyArgs : global::Pulumi.InvokeArgs + { + /// + /// The name (guid) of the role management policy to get. + /// + [Input("roleManagementPolicyName", required: true)] + public string RoleManagementPolicyName { get; set; } = null!; + + /// + /// The scope of the role management policy. + /// + [Input("scope", required: true)] + public string Scope { get; set; } = null!; + + public GetRoleManagementPolicyArgs() + { + } + public static new GetRoleManagementPolicyArgs Empty => new GetRoleManagementPolicyArgs(); + } + + public sealed class GetRoleManagementPolicyInvokeArgs : global::Pulumi.InvokeArgs + { + /// + /// The name (guid) of the role management policy to get. + /// + [Input("roleManagementPolicyName", required: true)] + public Input RoleManagementPolicyName { get; set; } = null!; + + /// + /// The scope of the role management policy. + /// + [Input("scope", required: true)] + public Input Scope { get; set; } = null!; + + public GetRoleManagementPolicyInvokeArgs() + { + } + public static new GetRoleManagementPolicyInvokeArgs Empty => new GetRoleManagementPolicyInvokeArgs(); + } + + + [OutputType] + public sealed class GetRoleManagementPolicyResult + { + /// + /// The role management policy description. + /// + public readonly string? Description; + /// + /// The role management policy display name. + /// + public readonly string? DisplayName; + /// + /// The readonly computed rule applied to the policy. + /// + public readonly ImmutableArray EffectiveRules; + /// + /// The role management policy Id. + /// + public readonly string Id; + /// + /// The role management policy is default policy. + /// + public readonly bool? IsOrganizationDefault; + /// + /// The name of the entity last modified it + /// + public readonly Outputs.PrincipalResponse LastModifiedBy; + /// + /// The last modified date time. + /// + public readonly string LastModifiedDateTime; + /// + /// The role management policy name. + /// + public readonly string Name; + /// + /// Additional properties of scope + /// + public readonly Outputs.PolicyPropertiesResponse PolicyProperties; + /// + /// The rule applied to the policy. + /// + public readonly ImmutableArray Rules; + /// + /// The role management policy scope. + /// + public readonly string? Scope; + /// + /// The role management policy type. + /// + public readonly string Type; + + [OutputConstructor] + private GetRoleManagementPolicyResult( + string? description, + + string? displayName, + + ImmutableArray effectiveRules, + + string id, + + bool? isOrganizationDefault, + + Outputs.PrincipalResponse lastModifiedBy, + + string lastModifiedDateTime, + + string name, + + Outputs.PolicyPropertiesResponse policyProperties, + + ImmutableArray rules, + + string? scope, + + string type) + { + Description = description; + DisplayName = displayName; + EffectiveRules = effectiveRules; + Id = id; + IsOrganizationDefault = isOrganizationDefault; + LastModifiedBy = lastModifiedBy; + LastModifiedDateTime = lastModifiedDateTime; + Name = name; + PolicyProperties = policyProperties; + Rules = rules; + Scope = scope; + Type = type; + } + } +} diff --git a/sdk/dotnet/Authorization/V20201001/Inputs/ApprovalSettingsArgs.cs b/sdk/dotnet/Authorization/V20201001/Inputs/ApprovalSettingsArgs.cs new file mode 100644 index 000000000000..a9dc0498f281 --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001/Inputs/ApprovalSettingsArgs.cs @@ -0,0 +1,59 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001.Inputs +{ + + /// + /// The approval settings. + /// + public sealed class ApprovalSettingsArgs : global::Pulumi.ResourceArgs + { + /// + /// The type of rule + /// + [Input("approvalMode")] + public InputUnion? ApprovalMode { get; set; } + + [Input("approvalStages")] + private InputList? _approvalStages; + + /// + /// The approval stages of the request. + /// + public InputList ApprovalStages + { + get => _approvalStages ?? (_approvalStages = new InputList()); + set => _approvalStages = value; + } + + /// + /// Determines whether approval is required or not. + /// + [Input("isApprovalRequired")] + public Input? IsApprovalRequired { get; set; } + + /// + /// Determines whether approval is required for assignment extension. + /// + [Input("isApprovalRequiredForExtension")] + public Input? IsApprovalRequiredForExtension { get; set; } + + /// + /// Determine whether requestor justification is required. + /// + [Input("isRequestorJustificationRequired")] + public Input? IsRequestorJustificationRequired { get; set; } + + public ApprovalSettingsArgs() + { + } + public static new ApprovalSettingsArgs Empty => new ApprovalSettingsArgs(); + } +} diff --git a/sdk/dotnet/Authorization/V20201001/Inputs/ApprovalStageArgs.cs b/sdk/dotnet/Authorization/V20201001/Inputs/ApprovalStageArgs.cs new file mode 100644 index 000000000000..e0ca3ef1be5f --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001/Inputs/ApprovalStageArgs.cs @@ -0,0 +1,71 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001.Inputs +{ + + /// + /// The approval stage. + /// + public sealed class ApprovalStageArgs : global::Pulumi.ResourceArgs + { + /// + /// The time in days when approval request would be timed out + /// + [Input("approvalStageTimeOutInDays")] + public Input? ApprovalStageTimeOutInDays { get; set; } + + [Input("escalationApprovers")] + private InputList? _escalationApprovers; + + /// + /// The escalation approver of the request. + /// + public InputList EscalationApprovers + { + get => _escalationApprovers ?? (_escalationApprovers = new InputList()); + set => _escalationApprovers = value; + } + + /// + /// The time in minutes when the approval request would be escalated if the primary approver does not approve + /// + [Input("escalationTimeInMinutes")] + public Input? EscalationTimeInMinutes { get; set; } + + /// + /// Determines whether approver need to provide justification for his decision. + /// + [Input("isApproverJustificationRequired")] + public Input? IsApproverJustificationRequired { get; set; } + + /// + /// The value determine whether escalation feature is enabled. + /// + [Input("isEscalationEnabled")] + public Input? IsEscalationEnabled { get; set; } + + [Input("primaryApprovers")] + private InputList? _primaryApprovers; + + /// + /// The primary approver of the request. + /// + public InputList PrimaryApprovers + { + get => _primaryApprovers ?? (_primaryApprovers = new InputList()); + set => _primaryApprovers = value; + } + + public ApprovalStageArgs() + { + } + public static new ApprovalStageArgs Empty => new ApprovalStageArgs(); + } +} diff --git a/sdk/dotnet/Authorization/V20201001/Inputs/RoleManagementPolicyApprovalRuleArgs.cs b/sdk/dotnet/Authorization/V20201001/Inputs/RoleManagementPolicyApprovalRuleArgs.cs new file mode 100644 index 000000000000..9820a482b630 --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001/Inputs/RoleManagementPolicyApprovalRuleArgs.cs @@ -0,0 +1,48 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001.Inputs +{ + + /// + /// The role management policy approval rule. + /// + public sealed class RoleManagementPolicyApprovalRuleArgs : global::Pulumi.ResourceArgs + { + /// + /// The id of the rule. + /// + [Input("id")] + public Input? Id { get; set; } + + /// + /// The type of rule + /// Expected value is 'RoleManagementPolicyApprovalRule'. + /// + [Input("ruleType", required: true)] + public Input RuleType { get; set; } = null!; + + /// + /// The approval setting + /// + [Input("setting")] + public Input? Setting { get; set; } + + /// + /// The target of the current rule. + /// + [Input("target")] + public Input? Target { get; set; } + + public RoleManagementPolicyApprovalRuleArgs() + { + } + public static new RoleManagementPolicyApprovalRuleArgs Empty => new RoleManagementPolicyApprovalRuleArgs(); + } +} diff --git a/sdk/dotnet/Authorization/V20201001/Inputs/RoleManagementPolicyAuthenticationContextRuleArgs.cs b/sdk/dotnet/Authorization/V20201001/Inputs/RoleManagementPolicyAuthenticationContextRuleArgs.cs new file mode 100644 index 000000000000..802e88ba521a --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001/Inputs/RoleManagementPolicyAuthenticationContextRuleArgs.cs @@ -0,0 +1,54 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001.Inputs +{ + + /// + /// The role management policy authentication context rule. + /// + public sealed class RoleManagementPolicyAuthenticationContextRuleArgs : global::Pulumi.ResourceArgs + { + /// + /// The claim value. + /// + [Input("claimValue")] + public Input? ClaimValue { get; set; } + + /// + /// The id of the rule. + /// + [Input("id")] + public Input? Id { get; set; } + + /// + /// The value indicating if rule is enabled. + /// + [Input("isEnabled")] + public Input? IsEnabled { get; set; } + + /// + /// The type of rule + /// Expected value is 'RoleManagementPolicyAuthenticationContextRule'. + /// + [Input("ruleType", required: true)] + public Input RuleType { get; set; } = null!; + + /// + /// The target of the current rule. + /// + [Input("target")] + public Input? Target { get; set; } + + public RoleManagementPolicyAuthenticationContextRuleArgs() + { + } + public static new RoleManagementPolicyAuthenticationContextRuleArgs Empty => new RoleManagementPolicyAuthenticationContextRuleArgs(); + } +} diff --git a/sdk/dotnet/Authorization/V20201001/Inputs/RoleManagementPolicyEnablementRuleArgs.cs b/sdk/dotnet/Authorization/V20201001/Inputs/RoleManagementPolicyEnablementRuleArgs.cs new file mode 100644 index 000000000000..f9773789dc26 --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001/Inputs/RoleManagementPolicyEnablementRuleArgs.cs @@ -0,0 +1,54 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001.Inputs +{ + + /// + /// The role management policy enablement rule. + /// + public sealed class RoleManagementPolicyEnablementRuleArgs : global::Pulumi.ResourceArgs + { + [Input("enabledRules")] + private InputList>? _enabledRules; + + /// + /// The list of enabled rules. + /// + public InputList> EnabledRules + { + get => _enabledRules ?? (_enabledRules = new InputList>()); + set => _enabledRules = value; + } + + /// + /// The id of the rule. + /// + [Input("id")] + public Input? Id { get; set; } + + /// + /// The type of rule + /// Expected value is 'RoleManagementPolicyEnablementRule'. + /// + [Input("ruleType", required: true)] + public Input RuleType { get; set; } = null!; + + /// + /// The target of the current rule. + /// + [Input("target")] + public Input? Target { get; set; } + + public RoleManagementPolicyEnablementRuleArgs() + { + } + public static new RoleManagementPolicyEnablementRuleArgs Empty => new RoleManagementPolicyEnablementRuleArgs(); + } +} diff --git a/sdk/dotnet/Authorization/V20201001/Inputs/RoleManagementPolicyExpirationRuleArgs.cs b/sdk/dotnet/Authorization/V20201001/Inputs/RoleManagementPolicyExpirationRuleArgs.cs new file mode 100644 index 000000000000..caf5a4d3f1a0 --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001/Inputs/RoleManagementPolicyExpirationRuleArgs.cs @@ -0,0 +1,54 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001.Inputs +{ + + /// + /// The role management policy expiration rule. + /// + public sealed class RoleManagementPolicyExpirationRuleArgs : global::Pulumi.ResourceArgs + { + /// + /// The id of the rule. + /// + [Input("id")] + public Input? Id { get; set; } + + /// + /// The value indicating whether expiration is required. + /// + [Input("isExpirationRequired")] + public Input? IsExpirationRequired { get; set; } + + /// + /// The maximum duration of expiration in timespan. + /// + [Input("maximumDuration")] + public Input? MaximumDuration { get; set; } + + /// + /// The type of rule + /// Expected value is 'RoleManagementPolicyExpirationRule'. + /// + [Input("ruleType", required: true)] + public Input RuleType { get; set; } = null!; + + /// + /// The target of the current rule. + /// + [Input("target")] + public Input? Target { get; set; } + + public RoleManagementPolicyExpirationRuleArgs() + { + } + public static new RoleManagementPolicyExpirationRuleArgs Empty => new RoleManagementPolicyExpirationRuleArgs(); + } +} diff --git a/sdk/dotnet/Authorization/V20201001/Inputs/RoleManagementPolicyNotificationRuleArgs.cs b/sdk/dotnet/Authorization/V20201001/Inputs/RoleManagementPolicyNotificationRuleArgs.cs new file mode 100644 index 000000000000..5f2cc7c11499 --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001/Inputs/RoleManagementPolicyNotificationRuleArgs.cs @@ -0,0 +1,78 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001.Inputs +{ + + /// + /// The role management policy notification rule. + /// + public sealed class RoleManagementPolicyNotificationRuleArgs : global::Pulumi.ResourceArgs + { + /// + /// The id of the rule. + /// + [Input("id")] + public Input? Id { get; set; } + + /// + /// Determines if the notification will be sent to the recipient type specified in the policy rule. + /// + [Input("isDefaultRecipientsEnabled")] + public Input? IsDefaultRecipientsEnabled { get; set; } + + /// + /// The notification level. + /// + [Input("notificationLevel")] + public InputUnion? NotificationLevel { get; set; } + + [Input("notificationRecipients")] + private InputList? _notificationRecipients; + + /// + /// The list of notification recipients. + /// + public InputList NotificationRecipients + { + get => _notificationRecipients ?? (_notificationRecipients = new InputList()); + set => _notificationRecipients = value; + } + + /// + /// The type of notification. + /// + [Input("notificationType")] + public InputUnion? NotificationType { get; set; } + + /// + /// The recipient type. + /// + [Input("recipientType")] + public InputUnion? RecipientType { get; set; } + + /// + /// The type of rule + /// Expected value is 'RoleManagementPolicyNotificationRule'. + /// + [Input("ruleType", required: true)] + public Input RuleType { get; set; } = null!; + + /// + /// The target of the current rule. + /// + [Input("target")] + public Input? Target { get; set; } + + public RoleManagementPolicyNotificationRuleArgs() + { + } + public static new RoleManagementPolicyNotificationRuleArgs Empty => new RoleManagementPolicyNotificationRuleArgs(); + } +} diff --git a/sdk/dotnet/Authorization/V20201001/Inputs/RoleManagementPolicyRuleTargetArgs.cs b/sdk/dotnet/Authorization/V20201001/Inputs/RoleManagementPolicyRuleTargetArgs.cs new file mode 100644 index 000000000000..a54422f30de3 --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001/Inputs/RoleManagementPolicyRuleTargetArgs.cs @@ -0,0 +1,83 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001.Inputs +{ + + /// + /// The role management policy rule target. + /// + public sealed class RoleManagementPolicyRuleTargetArgs : global::Pulumi.ResourceArgs + { + /// + /// The caller of the setting. + /// + [Input("caller")] + public Input? Caller { get; set; } + + [Input("enforcedSettings")] + private InputList? _enforcedSettings; + + /// + /// The list of enforced settings. + /// + public InputList EnforcedSettings + { + get => _enforcedSettings ?? (_enforcedSettings = new InputList()); + set => _enforcedSettings = value; + } + + [Input("inheritableSettings")] + private InputList? _inheritableSettings; + + /// + /// The list of inheritable settings. + /// + public InputList InheritableSettings + { + get => _inheritableSettings ?? (_inheritableSettings = new InputList()); + set => _inheritableSettings = value; + } + + /// + /// The assignment level to which rule is applied. + /// + [Input("level")] + public Input? Level { get; set; } + + [Input("operations")] + private InputList? _operations; + + /// + /// The type of operation. + /// + public InputList Operations + { + get => _operations ?? (_operations = new InputList()); + set => _operations = value; + } + + [Input("targetObjects")] + private InputList? _targetObjects; + + /// + /// The list of target objects. + /// + public InputList TargetObjects + { + get => _targetObjects ?? (_targetObjects = new InputList()); + set => _targetObjects = value; + } + + public RoleManagementPolicyRuleTargetArgs() + { + } + public static new RoleManagementPolicyRuleTargetArgs Empty => new RoleManagementPolicyRuleTargetArgs(); + } +} diff --git a/sdk/dotnet/Authorization/V20201001/Inputs/UserSetArgs.cs b/sdk/dotnet/Authorization/V20201001/Inputs/UserSetArgs.cs new file mode 100644 index 000000000000..65d425a20072 --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001/Inputs/UserSetArgs.cs @@ -0,0 +1,47 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001.Inputs +{ + + /// + /// The detail of a user. + /// + public sealed class UserSetArgs : global::Pulumi.ResourceArgs + { + /// + /// The description of the user. + /// + [Input("description")] + public Input? Description { get; set; } + + /// + /// The object id of the user. + /// + [Input("id")] + public Input? Id { get; set; } + + /// + /// The value indicating whether the user is a backup fallback approver + /// + [Input("isBackup")] + public Input? IsBackup { get; set; } + + /// + /// The type of user. + /// + [Input("userType")] + public InputUnion? UserType { get; set; } + + public UserSetArgs() + { + } + public static new UserSetArgs Empty => new UserSetArgs(); + } +} diff --git a/sdk/dotnet/Authorization/V20201001/Outputs/PolicyPropertiesResponse.cs b/sdk/dotnet/Authorization/V20201001/Outputs/PolicyPropertiesResponse.cs new file mode 100644 index 000000000000..545131d811d6 --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001/Outputs/PolicyPropertiesResponse.cs @@ -0,0 +1,30 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001.Outputs +{ + + /// + /// Expanded info of resource scope + /// + [OutputType] + public sealed class PolicyPropertiesResponse + { + /// + /// Details of the resource scope + /// + public readonly Outputs.PolicyPropertiesResponseScope Scope; + + [OutputConstructor] + private PolicyPropertiesResponse(Outputs.PolicyPropertiesResponseScope scope) + { + Scope = scope; + } + } +} diff --git a/sdk/dotnet/Authorization/V20201001/Outputs/PolicyPropertiesResponseScope.cs b/sdk/dotnet/Authorization/V20201001/Outputs/PolicyPropertiesResponseScope.cs new file mode 100644 index 000000000000..29d27f0be2f8 --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001/Outputs/PolicyPropertiesResponseScope.cs @@ -0,0 +1,45 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001.Outputs +{ + + /// + /// Details of the resource scope + /// + [OutputType] + public sealed class PolicyPropertiesResponseScope + { + /// + /// Display name of the resource + /// + public readonly string? DisplayName; + /// + /// Scope id of the resource + /// + public readonly string? Id; + /// + /// Type of the resource + /// + public readonly string? Type; + + [OutputConstructor] + private PolicyPropertiesResponseScope( + string? displayName, + + string? id, + + string? type) + { + DisplayName = displayName; + Id = id; + Type = type; + } + } +} diff --git a/sdk/dotnet/Authorization/V20201001/RoleManagementPolicy.cs b/sdk/dotnet/Authorization/V20201001/RoleManagementPolicy.cs new file mode 100644 index 000000000000..a0469f0dff12 --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001/RoleManagementPolicy.cs @@ -0,0 +1,181 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001 +{ + /// + /// Role management policy + /// + [AzureNativeResourceType("azure-native:authorization/v20201001:RoleManagementPolicy")] + public partial class RoleManagementPolicy : global::Pulumi.CustomResource + { + /// + /// The role management policy description. + /// + [Output("description")] + public Output Description { get; private set; } = null!; + + /// + /// The role management policy display name. + /// + [Output("displayName")] + public Output DisplayName { get; private set; } = null!; + + /// + /// The readonly computed rule applied to the policy. + /// + [Output("effectiveRules")] + public Output> EffectiveRules { get; private set; } = null!; + + /// + /// The role management policy is default policy. + /// + [Output("isOrganizationDefault")] + public Output IsOrganizationDefault { get; private set; } = null!; + + /// + /// The name of the entity last modified it + /// + [Output("lastModifiedBy")] + public Output LastModifiedBy { get; private set; } = null!; + + /// + /// The last modified date time. + /// + [Output("lastModifiedDateTime")] + public Output LastModifiedDateTime { get; private set; } = null!; + + /// + /// The role management policy name. + /// + [Output("name")] + public Output Name { get; private set; } = null!; + + /// + /// Additional properties of scope + /// + [Output("policyProperties")] + public Output PolicyProperties { get; private set; } = null!; + + /// + /// The rule applied to the policy. + /// + [Output("rules")] + public Output> Rules { get; private set; } = null!; + + /// + /// The role management policy scope. + /// + [Output("scope")] + public Output Scope { get; private set; } = null!; + + /// + /// The role management policy type. + /// + [Output("type")] + public Output Type { get; private set; } = null!; + + + /// + /// Create a RoleManagementPolicy resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public RoleManagementPolicy(string name, RoleManagementPolicyArgs args, CustomResourceOptions? options = null) + : base("azure-native:authorization/v20201001:RoleManagementPolicy", name, args ?? new RoleManagementPolicyArgs(), MakeResourceOptions(options, "")) + { + } + + private RoleManagementPolicy(string name, Input id, CustomResourceOptions? options = null) + : base("azure-native:authorization/v20201001:RoleManagementPolicy", name, null, MakeResourceOptions(options, id)) + { + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + Aliases = + { + new global::Pulumi.Alias { Type = "azure-native:authorization:RoleManagementPolicy" }, + new global::Pulumi.Alias { Type = "azure-native:authorization/v20201001preview:RoleManagementPolicy" }, + }, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing RoleManagementPolicy resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// A bag of options that control this resource's behavior + public static RoleManagementPolicy Get(string name, Input id, CustomResourceOptions? options = null) + { + return new RoleManagementPolicy(name, id, options); + } + } + + public sealed class RoleManagementPolicyArgs : global::Pulumi.ResourceArgs + { + /// + /// The role management policy description. + /// + [Input("description")] + public Input? Description { get; set; } + + /// + /// The role management policy display name. + /// + [Input("displayName")] + public Input? DisplayName { get; set; } + + /// + /// The role management policy is default policy. + /// + [Input("isOrganizationDefault")] + public Input? IsOrganizationDefault { get; set; } + + /// + /// The name (guid) of the role management policy to upsert. + /// + [Input("roleManagementPolicyName")] + public Input? RoleManagementPolicyName { get; set; } + + [Input("rules")] + private InputList? _rules; + + /// + /// The rule applied to the policy. + /// + public InputList Rules + { + get => _rules ?? (_rules = new InputList()); + set => _rules = value; + } + + /// + /// The role management policy scope. + /// + [Input("scope", required: true)] + public Input Scope { get; set; } = null!; + + public RoleManagementPolicyArgs() + { + } + public static new RoleManagementPolicyArgs Empty => new RoleManagementPolicyArgs(); + } +} diff --git a/sdk/dotnet/Authorization/V20201001Preview/Enums.cs b/sdk/dotnet/Authorization/V20201001Preview/Enums.cs new file mode 100644 index 000000000000..fc42cccdb15d --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001Preview/Enums.cs @@ -0,0 +1,233 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.ComponentModel; +using Pulumi; + +namespace Pulumi.AzureNative.Authorization.V20201001Preview +{ + /// + /// The type of rule + /// + [EnumType] + public readonly struct ApprovalMode : IEquatable + { + private readonly string _value; + + private ApprovalMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + public static ApprovalMode SingleStage { get; } = new ApprovalMode("SingleStage"); + public static ApprovalMode Serial { get; } = new ApprovalMode("Serial"); + public static ApprovalMode Parallel { get; } = new ApprovalMode("Parallel"); + public static ApprovalMode NoApproval { get; } = new ApprovalMode("NoApproval"); + + public static bool operator ==(ApprovalMode left, ApprovalMode right) => left.Equals(right); + public static bool operator !=(ApprovalMode left, ApprovalMode right) => !left.Equals(right); + + public static explicit operator string(ApprovalMode value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is ApprovalMode other && Equals(other); + public bool Equals(ApprovalMode other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } + + /// + /// The type of enablement rule + /// + [EnumType] + public readonly struct EnablementRules : IEquatable + { + private readonly string _value; + + private EnablementRules(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + public static EnablementRules MultiFactorAuthentication { get; } = new EnablementRules("MultiFactorAuthentication"); + public static EnablementRules Justification { get; } = new EnablementRules("Justification"); + public static EnablementRules Ticketing { get; } = new EnablementRules("Ticketing"); + + public static bool operator ==(EnablementRules left, EnablementRules right) => left.Equals(right); + public static bool operator !=(EnablementRules left, EnablementRules right) => !left.Equals(right); + + public static explicit operator string(EnablementRules value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is EnablementRules other && Equals(other); + public bool Equals(EnablementRules other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } + + /// + /// The type of notification. + /// + [EnumType] + public readonly struct NotificationDeliveryMechanism : IEquatable + { + private readonly string _value; + + private NotificationDeliveryMechanism(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + public static NotificationDeliveryMechanism Email { get; } = new NotificationDeliveryMechanism("Email"); + + public static bool operator ==(NotificationDeliveryMechanism left, NotificationDeliveryMechanism right) => left.Equals(right); + public static bool operator !=(NotificationDeliveryMechanism left, NotificationDeliveryMechanism right) => !left.Equals(right); + + public static explicit operator string(NotificationDeliveryMechanism value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is NotificationDeliveryMechanism other && Equals(other); + public bool Equals(NotificationDeliveryMechanism other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } + + /// + /// The notification level. + /// + [EnumType] + public readonly struct NotificationLevel : IEquatable + { + private readonly string _value; + + private NotificationLevel(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + public static NotificationLevel None { get; } = new NotificationLevel("None"); + public static NotificationLevel Critical { get; } = new NotificationLevel("Critical"); + public static NotificationLevel All { get; } = new NotificationLevel("All"); + + public static bool operator ==(NotificationLevel left, NotificationLevel right) => left.Equals(right); + public static bool operator !=(NotificationLevel left, NotificationLevel right) => !left.Equals(right); + + public static explicit operator string(NotificationLevel value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is NotificationLevel other && Equals(other); + public bool Equals(NotificationLevel other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } + + /// + /// The recipient type. + /// + [EnumType] + public readonly struct RecipientType : IEquatable + { + private readonly string _value; + + private RecipientType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + public static RecipientType Requestor { get; } = new RecipientType("Requestor"); + public static RecipientType Approver { get; } = new RecipientType("Approver"); + public static RecipientType Admin { get; } = new RecipientType("Admin"); + + public static bool operator ==(RecipientType left, RecipientType right) => left.Equals(right); + public static bool operator !=(RecipientType left, RecipientType right) => !left.Equals(right); + + public static explicit operator string(RecipientType value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is RecipientType other && Equals(other); + public bool Equals(RecipientType other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } + + /// + /// The type of rule + /// + [EnumType] + public readonly struct RoleManagementPolicyRuleType : IEquatable + { + private readonly string _value; + + private RoleManagementPolicyRuleType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + public static RoleManagementPolicyRuleType RoleManagementPolicyApprovalRule { get; } = new RoleManagementPolicyRuleType("RoleManagementPolicyApprovalRule"); + public static RoleManagementPolicyRuleType RoleManagementPolicyAuthenticationContextRule { get; } = new RoleManagementPolicyRuleType("RoleManagementPolicyAuthenticationContextRule"); + public static RoleManagementPolicyRuleType RoleManagementPolicyEnablementRule { get; } = new RoleManagementPolicyRuleType("RoleManagementPolicyEnablementRule"); + public static RoleManagementPolicyRuleType RoleManagementPolicyExpirationRule { get; } = new RoleManagementPolicyRuleType("RoleManagementPolicyExpirationRule"); + public static RoleManagementPolicyRuleType RoleManagementPolicyNotificationRule { get; } = new RoleManagementPolicyRuleType("RoleManagementPolicyNotificationRule"); + + public static bool operator ==(RoleManagementPolicyRuleType left, RoleManagementPolicyRuleType right) => left.Equals(right); + public static bool operator !=(RoleManagementPolicyRuleType left, RoleManagementPolicyRuleType right) => !left.Equals(right); + + public static explicit operator string(RoleManagementPolicyRuleType value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is RoleManagementPolicyRuleType other && Equals(other); + public bool Equals(RoleManagementPolicyRuleType other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } + + /// + /// The type of user. + /// + [EnumType] + public readonly struct UserType : IEquatable + { + private readonly string _value; + + private UserType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + public static UserType User { get; } = new UserType("User"); + public static UserType Group { get; } = new UserType("Group"); + + public static bool operator ==(UserType left, UserType right) => left.Equals(right); + public static bool operator !=(UserType left, UserType right) => !left.Equals(right); + + public static explicit operator string(UserType value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is UserType other && Equals(other); + public bool Equals(UserType other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } +} diff --git a/sdk/dotnet/Authorization/V20201001Preview/GetRoleManagementPolicy.cs b/sdk/dotnet/Authorization/V20201001Preview/GetRoleManagementPolicy.cs new file mode 100644 index 000000000000..01ff956c8027 --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001Preview/GetRoleManagementPolicy.cs @@ -0,0 +1,161 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001Preview +{ + public static class GetRoleManagementPolicy + { + /// + /// Get the specified role management policy for a resource scope + /// + public static Task InvokeAsync(GetRoleManagementPolicyArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.InvokeAsync("azure-native:authorization/v20201001preview:getRoleManagementPolicy", args ?? new GetRoleManagementPolicyArgs(), options.WithDefaults()); + + /// + /// Get the specified role management policy for a resource scope + /// + public static Output Invoke(GetRoleManagementPolicyInvokeArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.Invoke("azure-native:authorization/v20201001preview:getRoleManagementPolicy", args ?? new GetRoleManagementPolicyInvokeArgs(), options.WithDefaults()); + } + + + public sealed class GetRoleManagementPolicyArgs : global::Pulumi.InvokeArgs + { + /// + /// The name (guid) of the role management policy to get. + /// + [Input("roleManagementPolicyName", required: true)] + public string RoleManagementPolicyName { get; set; } = null!; + + /// + /// The scope of the role management policy. + /// + [Input("scope", required: true)] + public string Scope { get; set; } = null!; + + public GetRoleManagementPolicyArgs() + { + } + public static new GetRoleManagementPolicyArgs Empty => new GetRoleManagementPolicyArgs(); + } + + public sealed class GetRoleManagementPolicyInvokeArgs : global::Pulumi.InvokeArgs + { + /// + /// The name (guid) of the role management policy to get. + /// + [Input("roleManagementPolicyName", required: true)] + public Input RoleManagementPolicyName { get; set; } = null!; + + /// + /// The scope of the role management policy. + /// + [Input("scope", required: true)] + public Input Scope { get; set; } = null!; + + public GetRoleManagementPolicyInvokeArgs() + { + } + public static new GetRoleManagementPolicyInvokeArgs Empty => new GetRoleManagementPolicyInvokeArgs(); + } + + + [OutputType] + public sealed class GetRoleManagementPolicyResult + { + /// + /// The role management policy description. + /// + public readonly string? Description; + /// + /// The role management policy display name. + /// + public readonly string? DisplayName; + /// + /// The readonly computed rule applied to the policy. + /// + public readonly ImmutableArray EffectiveRules; + /// + /// The role management policy Id. + /// + public readonly string Id; + /// + /// The role management policy is default policy. + /// + public readonly bool? IsOrganizationDefault; + /// + /// The name of the entity last modified it + /// + public readonly Outputs.PrincipalResponse LastModifiedBy; + /// + /// The last modified date time. + /// + public readonly string LastModifiedDateTime; + /// + /// The role management policy name. + /// + public readonly string Name; + /// + /// Additional properties of scope + /// + public readonly Outputs.PolicyPropertiesResponse PolicyProperties; + /// + /// The rule applied to the policy. + /// + public readonly ImmutableArray Rules; + /// + /// The role management policy scope. + /// + public readonly string? Scope; + /// + /// The role management policy type. + /// + public readonly string Type; + + [OutputConstructor] + private GetRoleManagementPolicyResult( + string? description, + + string? displayName, + + ImmutableArray effectiveRules, + + string id, + + bool? isOrganizationDefault, + + Outputs.PrincipalResponse lastModifiedBy, + + string lastModifiedDateTime, + + string name, + + Outputs.PolicyPropertiesResponse policyProperties, + + ImmutableArray rules, + + string? scope, + + string type) + { + Description = description; + DisplayName = displayName; + EffectiveRules = effectiveRules; + Id = id; + IsOrganizationDefault = isOrganizationDefault; + LastModifiedBy = lastModifiedBy; + LastModifiedDateTime = lastModifiedDateTime; + Name = name; + PolicyProperties = policyProperties; + Rules = rules; + Scope = scope; + Type = type; + } + } +} diff --git a/sdk/dotnet/Authorization/V20201001Preview/Inputs/ApprovalSettingsArgs.cs b/sdk/dotnet/Authorization/V20201001Preview/Inputs/ApprovalSettingsArgs.cs new file mode 100644 index 000000000000..dfa657ba8281 --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001Preview/Inputs/ApprovalSettingsArgs.cs @@ -0,0 +1,59 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001Preview.Inputs +{ + + /// + /// The approval settings. + /// + public sealed class ApprovalSettingsArgs : global::Pulumi.ResourceArgs + { + /// + /// The type of rule + /// + [Input("approvalMode")] + public InputUnion? ApprovalMode { get; set; } + + [Input("approvalStages")] + private InputList? _approvalStages; + + /// + /// The approval stages of the request. + /// + public InputList ApprovalStages + { + get => _approvalStages ?? (_approvalStages = new InputList()); + set => _approvalStages = value; + } + + /// + /// Determines whether approval is required or not. + /// + [Input("isApprovalRequired")] + public Input? IsApprovalRequired { get; set; } + + /// + /// Determines whether approval is required for assignment extension. + /// + [Input("isApprovalRequiredForExtension")] + public Input? IsApprovalRequiredForExtension { get; set; } + + /// + /// Determine whether requestor justification is required. + /// + [Input("isRequestorJustificationRequired")] + public Input? IsRequestorJustificationRequired { get; set; } + + public ApprovalSettingsArgs() + { + } + public static new ApprovalSettingsArgs Empty => new ApprovalSettingsArgs(); + } +} diff --git a/sdk/dotnet/Authorization/V20201001Preview/Inputs/ApprovalStageArgs.cs b/sdk/dotnet/Authorization/V20201001Preview/Inputs/ApprovalStageArgs.cs new file mode 100644 index 000000000000..bd7dc9a3dcae --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001Preview/Inputs/ApprovalStageArgs.cs @@ -0,0 +1,71 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001Preview.Inputs +{ + + /// + /// The approval stage. + /// + public sealed class ApprovalStageArgs : global::Pulumi.ResourceArgs + { + /// + /// The time in days when approval request would be timed out + /// + [Input("approvalStageTimeOutInDays")] + public Input? ApprovalStageTimeOutInDays { get; set; } + + [Input("escalationApprovers")] + private InputList? _escalationApprovers; + + /// + /// The escalation approver of the request. + /// + public InputList EscalationApprovers + { + get => _escalationApprovers ?? (_escalationApprovers = new InputList()); + set => _escalationApprovers = value; + } + + /// + /// The time in minutes when the approval request would be escalated if the primary approver does not approve + /// + [Input("escalationTimeInMinutes")] + public Input? EscalationTimeInMinutes { get; set; } + + /// + /// Determines whether approver need to provide justification for his decision. + /// + [Input("isApproverJustificationRequired")] + public Input? IsApproverJustificationRequired { get; set; } + + /// + /// The value determine whether escalation feature is enabled. + /// + [Input("isEscalationEnabled")] + public Input? IsEscalationEnabled { get; set; } + + [Input("primaryApprovers")] + private InputList? _primaryApprovers; + + /// + /// The primary approver of the request. + /// + public InputList PrimaryApprovers + { + get => _primaryApprovers ?? (_primaryApprovers = new InputList()); + set => _primaryApprovers = value; + } + + public ApprovalStageArgs() + { + } + public static new ApprovalStageArgs Empty => new ApprovalStageArgs(); + } +} diff --git a/sdk/dotnet/Authorization/V20201001Preview/Inputs/RoleManagementPolicyApprovalRuleArgs.cs b/sdk/dotnet/Authorization/V20201001Preview/Inputs/RoleManagementPolicyApprovalRuleArgs.cs new file mode 100644 index 000000000000..d75a74279679 --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001Preview/Inputs/RoleManagementPolicyApprovalRuleArgs.cs @@ -0,0 +1,48 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001Preview.Inputs +{ + + /// + /// The role management policy approval rule. + /// + public sealed class RoleManagementPolicyApprovalRuleArgs : global::Pulumi.ResourceArgs + { + /// + /// The id of the rule. + /// + [Input("id")] + public Input? Id { get; set; } + + /// + /// The type of rule + /// Expected value is 'RoleManagementPolicyApprovalRule'. + /// + [Input("ruleType", required: true)] + public Input RuleType { get; set; } = null!; + + /// + /// The approval setting + /// + [Input("setting")] + public Input? Setting { get; set; } + + /// + /// The target of the current rule. + /// + [Input("target")] + public Input? Target { get; set; } + + public RoleManagementPolicyApprovalRuleArgs() + { + } + public static new RoleManagementPolicyApprovalRuleArgs Empty => new RoleManagementPolicyApprovalRuleArgs(); + } +} diff --git a/sdk/dotnet/Authorization/V20201001Preview/Inputs/RoleManagementPolicyAuthenticationContextRuleArgs.cs b/sdk/dotnet/Authorization/V20201001Preview/Inputs/RoleManagementPolicyAuthenticationContextRuleArgs.cs new file mode 100644 index 000000000000..9528359c77c6 --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001Preview/Inputs/RoleManagementPolicyAuthenticationContextRuleArgs.cs @@ -0,0 +1,54 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001Preview.Inputs +{ + + /// + /// The role management policy authentication context rule. + /// + public sealed class RoleManagementPolicyAuthenticationContextRuleArgs : global::Pulumi.ResourceArgs + { + /// + /// The claim value. + /// + [Input("claimValue")] + public Input? ClaimValue { get; set; } + + /// + /// The id of the rule. + /// + [Input("id")] + public Input? Id { get; set; } + + /// + /// The value indicating if rule is enabled. + /// + [Input("isEnabled")] + public Input? IsEnabled { get; set; } + + /// + /// The type of rule + /// Expected value is 'RoleManagementPolicyAuthenticationContextRule'. + /// + [Input("ruleType", required: true)] + public Input RuleType { get; set; } = null!; + + /// + /// The target of the current rule. + /// + [Input("target")] + public Input? Target { get; set; } + + public RoleManagementPolicyAuthenticationContextRuleArgs() + { + } + public static new RoleManagementPolicyAuthenticationContextRuleArgs Empty => new RoleManagementPolicyAuthenticationContextRuleArgs(); + } +} diff --git a/sdk/dotnet/Authorization/V20201001Preview/Inputs/RoleManagementPolicyEnablementRuleArgs.cs b/sdk/dotnet/Authorization/V20201001Preview/Inputs/RoleManagementPolicyEnablementRuleArgs.cs new file mode 100644 index 000000000000..782c64520a8d --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001Preview/Inputs/RoleManagementPolicyEnablementRuleArgs.cs @@ -0,0 +1,54 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001Preview.Inputs +{ + + /// + /// The role management policy rule. + /// + public sealed class RoleManagementPolicyEnablementRuleArgs : global::Pulumi.ResourceArgs + { + [Input("enabledRules")] + private InputList>? _enabledRules; + + /// + /// The list of enabled rules. + /// + public InputList> EnabledRules + { + get => _enabledRules ?? (_enabledRules = new InputList>()); + set => _enabledRules = value; + } + + /// + /// The id of the rule. + /// + [Input("id")] + public Input? Id { get; set; } + + /// + /// The type of rule + /// Expected value is 'RoleManagementPolicyEnablementRule'. + /// + [Input("ruleType", required: true)] + public Input RuleType { get; set; } = null!; + + /// + /// The target of the current rule. + /// + [Input("target")] + public Input? Target { get; set; } + + public RoleManagementPolicyEnablementRuleArgs() + { + } + public static new RoleManagementPolicyEnablementRuleArgs Empty => new RoleManagementPolicyEnablementRuleArgs(); + } +} diff --git a/sdk/dotnet/Authorization/V20201001Preview/Inputs/RoleManagementPolicyExpirationRuleArgs.cs b/sdk/dotnet/Authorization/V20201001Preview/Inputs/RoleManagementPolicyExpirationRuleArgs.cs new file mode 100644 index 000000000000..17740758e96d --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001Preview/Inputs/RoleManagementPolicyExpirationRuleArgs.cs @@ -0,0 +1,54 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001Preview.Inputs +{ + + /// + /// The role management policy expiration rule. + /// + public sealed class RoleManagementPolicyExpirationRuleArgs : global::Pulumi.ResourceArgs + { + /// + /// The id of the rule. + /// + [Input("id")] + public Input? Id { get; set; } + + /// + /// The value indicating whether expiration is required. + /// + [Input("isExpirationRequired")] + public Input? IsExpirationRequired { get; set; } + + /// + /// The maximum duration of expiration in timespan. + /// + [Input("maximumDuration")] + public Input? MaximumDuration { get; set; } + + /// + /// The type of rule + /// Expected value is 'RoleManagementPolicyExpirationRule'. + /// + [Input("ruleType", required: true)] + public Input RuleType { get; set; } = null!; + + /// + /// The target of the current rule. + /// + [Input("target")] + public Input? Target { get; set; } + + public RoleManagementPolicyExpirationRuleArgs() + { + } + public static new RoleManagementPolicyExpirationRuleArgs Empty => new RoleManagementPolicyExpirationRuleArgs(); + } +} diff --git a/sdk/dotnet/Authorization/V20201001Preview/Inputs/RoleManagementPolicyNotificationRuleArgs.cs b/sdk/dotnet/Authorization/V20201001Preview/Inputs/RoleManagementPolicyNotificationRuleArgs.cs new file mode 100644 index 000000000000..d7d3947a0d0f --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001Preview/Inputs/RoleManagementPolicyNotificationRuleArgs.cs @@ -0,0 +1,78 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001Preview.Inputs +{ + + /// + /// The role management policy notification rule. + /// + public sealed class RoleManagementPolicyNotificationRuleArgs : global::Pulumi.ResourceArgs + { + /// + /// The id of the rule. + /// + [Input("id")] + public Input? Id { get; set; } + + /// + /// Determines if the notification will be sent to the recipient type specified in the policy rule. + /// + [Input("isDefaultRecipientsEnabled")] + public Input? IsDefaultRecipientsEnabled { get; set; } + + /// + /// The notification level. + /// + [Input("notificationLevel")] + public InputUnion? NotificationLevel { get; set; } + + [Input("notificationRecipients")] + private InputList? _notificationRecipients; + + /// + /// The list of notification recipients. + /// + public InputList NotificationRecipients + { + get => _notificationRecipients ?? (_notificationRecipients = new InputList()); + set => _notificationRecipients = value; + } + + /// + /// The type of notification. + /// + [Input("notificationType")] + public InputUnion? NotificationType { get; set; } + + /// + /// The recipient type. + /// + [Input("recipientType")] + public InputUnion? RecipientType { get; set; } + + /// + /// The type of rule + /// Expected value is 'RoleManagementPolicyNotificationRule'. + /// + [Input("ruleType", required: true)] + public Input RuleType { get; set; } = null!; + + /// + /// The target of the current rule. + /// + [Input("target")] + public Input? Target { get; set; } + + public RoleManagementPolicyNotificationRuleArgs() + { + } + public static new RoleManagementPolicyNotificationRuleArgs Empty => new RoleManagementPolicyNotificationRuleArgs(); + } +} diff --git a/sdk/dotnet/Authorization/V20201001Preview/Inputs/RoleManagementPolicyRuleTargetArgs.cs b/sdk/dotnet/Authorization/V20201001Preview/Inputs/RoleManagementPolicyRuleTargetArgs.cs new file mode 100644 index 000000000000..20eef4b33efc --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001Preview/Inputs/RoleManagementPolicyRuleTargetArgs.cs @@ -0,0 +1,83 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001Preview.Inputs +{ + + /// + /// The role management policy rule target. + /// + public sealed class RoleManagementPolicyRuleTargetArgs : global::Pulumi.ResourceArgs + { + /// + /// The caller of the setting. + /// + [Input("caller")] + public Input? Caller { get; set; } + + [Input("enforcedSettings")] + private InputList? _enforcedSettings; + + /// + /// The list of enforced settings. + /// + public InputList EnforcedSettings + { + get => _enforcedSettings ?? (_enforcedSettings = new InputList()); + set => _enforcedSettings = value; + } + + [Input("inheritableSettings")] + private InputList? _inheritableSettings; + + /// + /// The list of inheritable settings. + /// + public InputList InheritableSettings + { + get => _inheritableSettings ?? (_inheritableSettings = new InputList()); + set => _inheritableSettings = value; + } + + /// + /// The assignment level to which rule is applied. + /// + [Input("level")] + public Input? Level { get; set; } + + [Input("operations")] + private InputList? _operations; + + /// + /// The type of operation. + /// + public InputList Operations + { + get => _operations ?? (_operations = new InputList()); + set => _operations = value; + } + + [Input("targetObjects")] + private InputList? _targetObjects; + + /// + /// The list of target objects. + /// + public InputList TargetObjects + { + get => _targetObjects ?? (_targetObjects = new InputList()); + set => _targetObjects = value; + } + + public RoleManagementPolicyRuleTargetArgs() + { + } + public static new RoleManagementPolicyRuleTargetArgs Empty => new RoleManagementPolicyRuleTargetArgs(); + } +} diff --git a/sdk/dotnet/Authorization/V20201001Preview/Inputs/UserSetArgs.cs b/sdk/dotnet/Authorization/V20201001Preview/Inputs/UserSetArgs.cs new file mode 100644 index 000000000000..c660246c8fa7 --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001Preview/Inputs/UserSetArgs.cs @@ -0,0 +1,47 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001Preview.Inputs +{ + + /// + /// The detail of a user. + /// + public sealed class UserSetArgs : global::Pulumi.ResourceArgs + { + /// + /// The description of the user. + /// + [Input("description")] + public Input? Description { get; set; } + + /// + /// The object id of the user. + /// + [Input("id")] + public Input? Id { get; set; } + + /// + /// The value indicating whether the user is a backup fallback approver + /// + [Input("isBackup")] + public Input? IsBackup { get; set; } + + /// + /// The type of user. + /// + [Input("userType")] + public InputUnion? UserType { get; set; } + + public UserSetArgs() + { + } + public static new UserSetArgs Empty => new UserSetArgs(); + } +} diff --git a/sdk/dotnet/Authorization/V20201001Preview/Outputs/ApprovalSettingsResponse.cs b/sdk/dotnet/Authorization/V20201001Preview/Outputs/ApprovalSettingsResponse.cs new file mode 100644 index 000000000000..2ee9647b1070 --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001Preview/Outputs/ApprovalSettingsResponse.cs @@ -0,0 +1,59 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001Preview.Outputs +{ + + /// + /// The approval settings. + /// + [OutputType] + public sealed class ApprovalSettingsResponse + { + /// + /// The type of rule + /// + public readonly string? ApprovalMode; + /// + /// The approval stages of the request. + /// + public readonly ImmutableArray ApprovalStages; + /// + /// Determines whether approval is required or not. + /// + public readonly bool? IsApprovalRequired; + /// + /// Determines whether approval is required for assignment extension. + /// + public readonly bool? IsApprovalRequiredForExtension; + /// + /// Determine whether requestor justification is required. + /// + public readonly bool? IsRequestorJustificationRequired; + + [OutputConstructor] + private ApprovalSettingsResponse( + string? approvalMode, + + ImmutableArray approvalStages, + + bool? isApprovalRequired, + + bool? isApprovalRequiredForExtension, + + bool? isRequestorJustificationRequired) + { + ApprovalMode = approvalMode; + ApprovalStages = approvalStages; + IsApprovalRequired = isApprovalRequired; + IsApprovalRequiredForExtension = isApprovalRequiredForExtension; + IsRequestorJustificationRequired = isRequestorJustificationRequired; + } + } +} diff --git a/sdk/dotnet/Authorization/V20201001Preview/Outputs/ApprovalStageResponse.cs b/sdk/dotnet/Authorization/V20201001Preview/Outputs/ApprovalStageResponse.cs new file mode 100644 index 000000000000..95bb4368439c --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001Preview/Outputs/ApprovalStageResponse.cs @@ -0,0 +1,66 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001Preview.Outputs +{ + + /// + /// The approval stage. + /// + [OutputType] + public sealed class ApprovalStageResponse + { + /// + /// The time in days when approval request would be timed out + /// + public readonly int? ApprovalStageTimeOutInDays; + /// + /// The escalation approver of the request. + /// + public readonly ImmutableArray EscalationApprovers; + /// + /// The time in minutes when the approval request would be escalated if the primary approver does not approve + /// + public readonly int? EscalationTimeInMinutes; + /// + /// Determines whether approver need to provide justification for his decision. + /// + public readonly bool? IsApproverJustificationRequired; + /// + /// The value determine whether escalation feature is enabled. + /// + public readonly bool? IsEscalationEnabled; + /// + /// The primary approver of the request. + /// + public readonly ImmutableArray PrimaryApprovers; + + [OutputConstructor] + private ApprovalStageResponse( + int? approvalStageTimeOutInDays, + + ImmutableArray escalationApprovers, + + int? escalationTimeInMinutes, + + bool? isApproverJustificationRequired, + + bool? isEscalationEnabled, + + ImmutableArray primaryApprovers) + { + ApprovalStageTimeOutInDays = approvalStageTimeOutInDays; + EscalationApprovers = escalationApprovers; + EscalationTimeInMinutes = escalationTimeInMinutes; + IsApproverJustificationRequired = isApproverJustificationRequired; + IsEscalationEnabled = isEscalationEnabled; + PrimaryApprovers = primaryApprovers; + } + } +} diff --git a/sdk/dotnet/Authorization/V20201001Preview/Outputs/PolicyPropertiesResponse.cs b/sdk/dotnet/Authorization/V20201001Preview/Outputs/PolicyPropertiesResponse.cs new file mode 100644 index 000000000000..9de83b0695cd --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001Preview/Outputs/PolicyPropertiesResponse.cs @@ -0,0 +1,27 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001Preview.Outputs +{ + + [OutputType] + public sealed class PolicyPropertiesResponse + { + /// + /// Details of the resource scope + /// + public readonly Outputs.PolicyPropertiesResponseScope Scope; + + [OutputConstructor] + private PolicyPropertiesResponse(Outputs.PolicyPropertiesResponseScope scope) + { + Scope = scope; + } + } +} diff --git a/sdk/dotnet/Authorization/V20201001Preview/Outputs/PolicyPropertiesResponseScope.cs b/sdk/dotnet/Authorization/V20201001Preview/Outputs/PolicyPropertiesResponseScope.cs new file mode 100644 index 000000000000..d6bf0b18fd16 --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001Preview/Outputs/PolicyPropertiesResponseScope.cs @@ -0,0 +1,45 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001Preview.Outputs +{ + + /// + /// Details of the resource scope + /// + [OutputType] + public sealed class PolicyPropertiesResponseScope + { + /// + /// Display name of the resource + /// + public readonly string? DisplayName; + /// + /// Scope id of the resource + /// + public readonly string? Id; + /// + /// Type of the resource + /// + public readonly string? Type; + + [OutputConstructor] + private PolicyPropertiesResponseScope( + string? displayName, + + string? id, + + string? type) + { + DisplayName = displayName; + Id = id; + Type = type; + } + } +} diff --git a/sdk/dotnet/Authorization/V20201001Preview/Outputs/RoleManagementPolicyApprovalRuleResponse.cs b/sdk/dotnet/Authorization/V20201001Preview/Outputs/RoleManagementPolicyApprovalRuleResponse.cs new file mode 100644 index 000000000000..a2d4bd36bd42 --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001Preview/Outputs/RoleManagementPolicyApprovalRuleResponse.cs @@ -0,0 +1,53 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001Preview.Outputs +{ + + /// + /// The role management policy approval rule. + /// + [OutputType] + public sealed class RoleManagementPolicyApprovalRuleResponse + { + /// + /// The id of the rule. + /// + public readonly string? Id; + /// + /// The type of rule + /// Expected value is 'RoleManagementPolicyApprovalRule'. + /// + public readonly string RuleType; + /// + /// The approval setting + /// + public readonly Outputs.ApprovalSettingsResponse? Setting; + /// + /// The target of the current rule. + /// + public readonly Outputs.RoleManagementPolicyRuleTargetResponse? Target; + + [OutputConstructor] + private RoleManagementPolicyApprovalRuleResponse( + string? id, + + string ruleType, + + Outputs.ApprovalSettingsResponse? setting, + + Outputs.RoleManagementPolicyRuleTargetResponse? target) + { + Id = id; + RuleType = ruleType; + Setting = setting; + Target = target; + } + } +} diff --git a/sdk/dotnet/Authorization/V20201001Preview/Outputs/RoleManagementPolicyAuthenticationContextRuleResponse.cs b/sdk/dotnet/Authorization/V20201001Preview/Outputs/RoleManagementPolicyAuthenticationContextRuleResponse.cs new file mode 100644 index 000000000000..4f9e61867e9a --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001Preview/Outputs/RoleManagementPolicyAuthenticationContextRuleResponse.cs @@ -0,0 +1,60 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001Preview.Outputs +{ + + /// + /// The role management policy authentication context rule. + /// + [OutputType] + public sealed class RoleManagementPolicyAuthenticationContextRuleResponse + { + /// + /// The claim value. + /// + public readonly string? ClaimValue; + /// + /// The id of the rule. + /// + public readonly string? Id; + /// + /// The value indicating if rule is enabled. + /// + public readonly bool? IsEnabled; + /// + /// The type of rule + /// Expected value is 'RoleManagementPolicyAuthenticationContextRule'. + /// + public readonly string RuleType; + /// + /// The target of the current rule. + /// + public readonly Outputs.RoleManagementPolicyRuleTargetResponse? Target; + + [OutputConstructor] + private RoleManagementPolicyAuthenticationContextRuleResponse( + string? claimValue, + + string? id, + + bool? isEnabled, + + string ruleType, + + Outputs.RoleManagementPolicyRuleTargetResponse? target) + { + ClaimValue = claimValue; + Id = id; + IsEnabled = isEnabled; + RuleType = ruleType; + Target = target; + } + } +} diff --git a/sdk/dotnet/Authorization/V20201001Preview/Outputs/RoleManagementPolicyEnablementRuleResponse.cs b/sdk/dotnet/Authorization/V20201001Preview/Outputs/RoleManagementPolicyEnablementRuleResponse.cs new file mode 100644 index 000000000000..c05349a1359c --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001Preview/Outputs/RoleManagementPolicyEnablementRuleResponse.cs @@ -0,0 +1,53 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001Preview.Outputs +{ + + /// + /// The role management policy rule. + /// + [OutputType] + public sealed class RoleManagementPolicyEnablementRuleResponse + { + /// + /// The list of enabled rules. + /// + public readonly ImmutableArray EnabledRules; + /// + /// The id of the rule. + /// + public readonly string? Id; + /// + /// The type of rule + /// Expected value is 'RoleManagementPolicyEnablementRule'. + /// + public readonly string RuleType; + /// + /// The target of the current rule. + /// + public readonly Outputs.RoleManagementPolicyRuleTargetResponse? Target; + + [OutputConstructor] + private RoleManagementPolicyEnablementRuleResponse( + ImmutableArray enabledRules, + + string? id, + + string ruleType, + + Outputs.RoleManagementPolicyRuleTargetResponse? target) + { + EnabledRules = enabledRules; + Id = id; + RuleType = ruleType; + Target = target; + } + } +} diff --git a/sdk/dotnet/Authorization/V20201001Preview/Outputs/RoleManagementPolicyExpirationRuleResponse.cs b/sdk/dotnet/Authorization/V20201001Preview/Outputs/RoleManagementPolicyExpirationRuleResponse.cs new file mode 100644 index 000000000000..bb0a5c472afc --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001Preview/Outputs/RoleManagementPolicyExpirationRuleResponse.cs @@ -0,0 +1,60 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001Preview.Outputs +{ + + /// + /// The role management policy expiration rule. + /// + [OutputType] + public sealed class RoleManagementPolicyExpirationRuleResponse + { + /// + /// The id of the rule. + /// + public readonly string? Id; + /// + /// The value indicating whether expiration is required. + /// + public readonly bool? IsExpirationRequired; + /// + /// The maximum duration of expiration in timespan. + /// + public readonly string? MaximumDuration; + /// + /// The type of rule + /// Expected value is 'RoleManagementPolicyExpirationRule'. + /// + public readonly string RuleType; + /// + /// The target of the current rule. + /// + public readonly Outputs.RoleManagementPolicyRuleTargetResponse? Target; + + [OutputConstructor] + private RoleManagementPolicyExpirationRuleResponse( + string? id, + + bool? isExpirationRequired, + + string? maximumDuration, + + string ruleType, + + Outputs.RoleManagementPolicyRuleTargetResponse? target) + { + Id = id; + IsExpirationRequired = isExpirationRequired; + MaximumDuration = maximumDuration; + RuleType = ruleType; + Target = target; + } + } +} diff --git a/sdk/dotnet/Authorization/V20201001Preview/Outputs/RoleManagementPolicyNotificationRuleResponse.cs b/sdk/dotnet/Authorization/V20201001Preview/Outputs/RoleManagementPolicyNotificationRuleResponse.cs new file mode 100644 index 000000000000..3d96ab7bddb0 --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001Preview/Outputs/RoleManagementPolicyNotificationRuleResponse.cs @@ -0,0 +1,81 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001Preview.Outputs +{ + + /// + /// The role management policy notification rule. + /// + [OutputType] + public sealed class RoleManagementPolicyNotificationRuleResponse + { + /// + /// The id of the rule. + /// + public readonly string? Id; + /// + /// Determines if the notification will be sent to the recipient type specified in the policy rule. + /// + public readonly bool? IsDefaultRecipientsEnabled; + /// + /// The notification level. + /// + public readonly string? NotificationLevel; + /// + /// The list of notification recipients. + /// + public readonly ImmutableArray NotificationRecipients; + /// + /// The type of notification. + /// + public readonly string? NotificationType; + /// + /// The recipient type. + /// + public readonly string? RecipientType; + /// + /// The type of rule + /// Expected value is 'RoleManagementPolicyNotificationRule'. + /// + public readonly string RuleType; + /// + /// The target of the current rule. + /// + public readonly Outputs.RoleManagementPolicyRuleTargetResponse? Target; + + [OutputConstructor] + private RoleManagementPolicyNotificationRuleResponse( + string? id, + + bool? isDefaultRecipientsEnabled, + + string? notificationLevel, + + ImmutableArray notificationRecipients, + + string? notificationType, + + string? recipientType, + + string ruleType, + + Outputs.RoleManagementPolicyRuleTargetResponse? target) + { + Id = id; + IsDefaultRecipientsEnabled = isDefaultRecipientsEnabled; + NotificationLevel = notificationLevel; + NotificationRecipients = notificationRecipients; + NotificationType = notificationType; + RecipientType = recipientType; + RuleType = ruleType; + Target = target; + } + } +} diff --git a/sdk/dotnet/Authorization/V20201001Preview/Outputs/RoleManagementPolicyRuleTargetResponse.cs b/sdk/dotnet/Authorization/V20201001Preview/Outputs/RoleManagementPolicyRuleTargetResponse.cs new file mode 100644 index 000000000000..b5b94cade9bb --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001Preview/Outputs/RoleManagementPolicyRuleTargetResponse.cs @@ -0,0 +1,66 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001Preview.Outputs +{ + + /// + /// The role management policy rule target. + /// + [OutputType] + public sealed class RoleManagementPolicyRuleTargetResponse + { + /// + /// The caller of the setting. + /// + public readonly string? Caller; + /// + /// The list of enforced settings. + /// + public readonly ImmutableArray EnforcedSettings; + /// + /// The list of inheritable settings. + /// + public readonly ImmutableArray InheritableSettings; + /// + /// The assignment level to which rule is applied. + /// + public readonly string? Level; + /// + /// The type of operation. + /// + public readonly ImmutableArray Operations; + /// + /// The list of target objects. + /// + public readonly ImmutableArray TargetObjects; + + [OutputConstructor] + private RoleManagementPolicyRuleTargetResponse( + string? caller, + + ImmutableArray enforcedSettings, + + ImmutableArray inheritableSettings, + + string? level, + + ImmutableArray operations, + + ImmutableArray targetObjects) + { + Caller = caller; + EnforcedSettings = enforcedSettings; + InheritableSettings = inheritableSettings; + Level = level; + Operations = operations; + TargetObjects = targetObjects; + } + } +} diff --git a/sdk/dotnet/Authorization/V20201001Preview/Outputs/UserSetResponse.cs b/sdk/dotnet/Authorization/V20201001Preview/Outputs/UserSetResponse.cs new file mode 100644 index 000000000000..b1ba5070dfc4 --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001Preview/Outputs/UserSetResponse.cs @@ -0,0 +1,52 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001Preview.Outputs +{ + + /// + /// The detail of a user. + /// + [OutputType] + public sealed class UserSetResponse + { + /// + /// The description of the user. + /// + public readonly string? Description; + /// + /// The object id of the user. + /// + public readonly string? Id; + /// + /// The value indicating whether the user is a backup fallback approver + /// + public readonly bool? IsBackup; + /// + /// The type of user. + /// + public readonly string? UserType; + + [OutputConstructor] + private UserSetResponse( + string? description, + + string? id, + + bool? isBackup, + + string? userType) + { + Description = description; + Id = id; + IsBackup = isBackup; + UserType = userType; + } + } +} diff --git a/sdk/dotnet/Authorization/V20201001Preview/RoleManagementPolicy.cs b/sdk/dotnet/Authorization/V20201001Preview/RoleManagementPolicy.cs new file mode 100644 index 000000000000..a1c42953e360 --- /dev/null +++ b/sdk/dotnet/Authorization/V20201001Preview/RoleManagementPolicy.cs @@ -0,0 +1,181 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.AzureNative.Authorization.V20201001Preview +{ + /// + /// Role management policy + /// + [AzureNativeResourceType("azure-native:authorization/v20201001preview:RoleManagementPolicy")] + public partial class RoleManagementPolicy : global::Pulumi.CustomResource + { + /// + /// The role management policy description. + /// + [Output("description")] + public Output Description { get; private set; } = null!; + + /// + /// The role management policy display name. + /// + [Output("displayName")] + public Output DisplayName { get; private set; } = null!; + + /// + /// The readonly computed rule applied to the policy. + /// + [Output("effectiveRules")] + public Output> EffectiveRules { get; private set; } = null!; + + /// + /// The role management policy is default policy. + /// + [Output("isOrganizationDefault")] + public Output IsOrganizationDefault { get; private set; } = null!; + + /// + /// The name of the entity last modified it + /// + [Output("lastModifiedBy")] + public Output LastModifiedBy { get; private set; } = null!; + + /// + /// The last modified date time. + /// + [Output("lastModifiedDateTime")] + public Output LastModifiedDateTime { get; private set; } = null!; + + /// + /// The role management policy name. + /// + [Output("name")] + public Output Name { get; private set; } = null!; + + /// + /// Additional properties of scope + /// + [Output("policyProperties")] + public Output PolicyProperties { get; private set; } = null!; + + /// + /// The rule applied to the policy. + /// + [Output("rules")] + public Output> Rules { get; private set; } = null!; + + /// + /// The role management policy scope. + /// + [Output("scope")] + public Output Scope { get; private set; } = null!; + + /// + /// The role management policy type. + /// + [Output("type")] + public Output Type { get; private set; } = null!; + + + /// + /// Create a RoleManagementPolicy resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public RoleManagementPolicy(string name, RoleManagementPolicyArgs args, CustomResourceOptions? options = null) + : base("azure-native:authorization/v20201001preview:RoleManagementPolicy", name, args ?? new RoleManagementPolicyArgs(), MakeResourceOptions(options, "")) + { + } + + private RoleManagementPolicy(string name, Input id, CustomResourceOptions? options = null) + : base("azure-native:authorization/v20201001preview:RoleManagementPolicy", name, null, MakeResourceOptions(options, id)) + { + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + Aliases = + { + new global::Pulumi.Alias { Type = "azure-native:authorization:RoleManagementPolicy" }, + new global::Pulumi.Alias { Type = "azure-native:authorization/v20201001:RoleManagementPolicy" }, + }, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing RoleManagementPolicy resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// A bag of options that control this resource's behavior + public static RoleManagementPolicy Get(string name, Input id, CustomResourceOptions? options = null) + { + return new RoleManagementPolicy(name, id, options); + } + } + + public sealed class RoleManagementPolicyArgs : global::Pulumi.ResourceArgs + { + /// + /// The role management policy description. + /// + [Input("description")] + public Input? Description { get; set; } + + /// + /// The role management policy display name. + /// + [Input("displayName")] + public Input? DisplayName { get; set; } + + /// + /// The role management policy is default policy. + /// + [Input("isOrganizationDefault")] + public Input? IsOrganizationDefault { get; set; } + + /// + /// The name (guid) of the role management policy to upsert. + /// + [Input("roleManagementPolicyName")] + public Input? RoleManagementPolicyName { get; set; } + + [Input("rules")] + private InputList? _rules; + + /// + /// The rule applied to the policy. + /// + public InputList Rules + { + get => _rules ?? (_rules = new InputList()); + set => _rules = value; + } + + /// + /// The role management policy scope. + /// + [Input("scope", required: true)] + public Input Scope { get; set; } = null!; + + public RoleManagementPolicyArgs() + { + } + public static new RoleManagementPolicyArgs Empty => new RoleManagementPolicyArgs(); + } +} diff --git a/sdk/python/pulumi_azure_native/__init__.py b/sdk/python/pulumi_azure_native/__init__.py index 35e835d0116e..f6e72b644862 100644 --- a/sdk/python/pulumi_azure_native/__init__.py +++ b/sdk/python/pulumi_azure_native/__init__.py @@ -1985,6 +1985,7 @@ "azure-native:authorization:ResourceManagementPrivateLink": "ResourceManagementPrivateLink", "azure-native:authorization:RoleAssignment": "RoleAssignment", "azure-native:authorization:RoleDefinition": "RoleDefinition", + "azure-native:authorization:RoleManagementPolicy": "RoleManagementPolicy", "azure-native:authorization:RoleManagementPolicyAssignment": "RoleManagementPolicyAssignment", "azure-native:authorization:ScopeAccessReviewHistoryDefinitionById": "ScopeAccessReviewHistoryDefinitionById", "azure-native:authorization:ScopeAccessReviewScheduleDefinitionById": "ScopeAccessReviewScheduleDefinitionById", @@ -2065,6 +2066,7 @@ "mod": "authorization/v20201001", "fqn": "pulumi_azure_native.authorization.v20201001", "classes": { + "azure-native:authorization/v20201001:RoleManagementPolicy": "RoleManagementPolicy", "azure-native:authorization/v20201001:RoleManagementPolicyAssignment": "RoleManagementPolicyAssignment" } }, @@ -2073,6 +2075,7 @@ "mod": "authorization/v20201001preview", "fqn": "pulumi_azure_native.authorization.v20201001preview", "classes": { + "azure-native:authorization/v20201001preview:RoleManagementPolicy": "RoleManagementPolicy", "azure-native:authorization/v20201001preview:RoleManagementPolicyAssignment": "RoleManagementPolicyAssignment" } }, diff --git a/sdk/python/pulumi_azure_native/authorization/__init__.py b/sdk/python/pulumi_azure_native/authorization/__init__.py index c07d91635b9f..9a82a7d6da95 100644 --- a/sdk/python/pulumi_azure_native/authorization/__init__.py +++ b/sdk/python/pulumi_azure_native/authorization/__init__.py @@ -30,6 +30,7 @@ from .get_resource_management_private_link import * from .get_role_assignment import * from .get_role_definition import * +from .get_role_management_policy import * from .get_role_management_policy_assignment import * from .get_scope_access_review_history_definition_by_id import * from .get_scope_access_review_schedule_definition_by_id import * @@ -61,6 +62,7 @@ from .resource_management_private_link import * from .role_assignment import * from .role_definition import * +from .role_management_policy import * from .role_management_policy_assignment import * from .scope_access_review_history_definition_by_id import * from .scope_access_review_schedule_definition_by_id import * diff --git a/sdk/python/pulumi_azure_native/authorization/_enums.py b/sdk/python/pulumi_azure_native/authorization/_enums.py index 0b3c1469b1c0..760e5de77772 100644 --- a/sdk/python/pulumi_azure_native/authorization/_enums.py +++ b/sdk/python/pulumi_azure_native/authorization/_enums.py @@ -8,18 +8,25 @@ 'AccessReviewRecurrencePatternType', 'AccessReviewRecurrenceRangeType', 'AccessReviewResult', + 'ApprovalMode', 'AssignmentScopeValidation', 'DefaultDecisionType', + 'EnablementRules', 'EnforcementMode', 'ExemptionCategory', 'LockLevel', + 'NotificationDeliveryMechanism', + 'NotificationLevel', 'OverrideKind', 'ParameterType', 'PolicyType', 'PrincipalType', 'PublicNetworkAccessOptions', + 'RecipientType', 'ResourceIdentityType', + 'RoleManagementPolicyRuleType', 'SelectorKind', + 'UserType', ] @@ -51,6 +58,16 @@ class AccessReviewResult(str, Enum): NOT_NOTIFIED = "NotNotified" +class ApprovalMode(str, Enum): + """ + The type of rule + """ + SINGLE_STAGE = "SingleStage" + SERIAL = "Serial" + PARALLEL = "Parallel" + NO_APPROVAL = "NoApproval" + + class AssignmentScopeValidation(str, Enum): """ The option whether validate the exemption is at or under the assignment scope. @@ -74,6 +91,15 @@ class DefaultDecisionType(str, Enum): RECOMMENDATION = "Recommendation" +class EnablementRules(str, Enum): + """ + The type of enablement rule + """ + MULTI_FACTOR_AUTHENTICATION = "MultiFactorAuthentication" + JUSTIFICATION = "Justification" + TICKETING = "Ticketing" + + class EnforcementMode(str, Enum): """ The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. @@ -111,6 +137,22 @@ class LockLevel(str, Enum): READ_ONLY = "ReadOnly" +class NotificationDeliveryMechanism(str, Enum): + """ + The type of notification. + """ + EMAIL = "Email" + + +class NotificationLevel(str, Enum): + """ + The notification level. + """ + NONE = "None" + CRITICAL = "Critical" + ALL = "All" + + class OverrideKind(str, Enum): """ The override kind. @@ -160,6 +202,15 @@ class PublicNetworkAccessOptions(str, Enum): DISABLED = "Disabled" +class RecipientType(str, Enum): + """ + The recipient type. + """ + REQUESTOR = "Requestor" + APPROVER = "Approver" + ADMIN = "Admin" + + class ResourceIdentityType(str, Enum): """ The identity type. This is the only required field when adding a system or user assigned identity to a resource. @@ -178,6 +229,17 @@ class ResourceIdentityType(str, Enum): """ +class RoleManagementPolicyRuleType(str, Enum): + """ + The type of rule + """ + ROLE_MANAGEMENT_POLICY_APPROVAL_RULE = "RoleManagementPolicyApprovalRule" + ROLE_MANAGEMENT_POLICY_AUTHENTICATION_CONTEXT_RULE = "RoleManagementPolicyAuthenticationContextRule" + ROLE_MANAGEMENT_POLICY_ENABLEMENT_RULE = "RoleManagementPolicyEnablementRule" + ROLE_MANAGEMENT_POLICY_EXPIRATION_RULE = "RoleManagementPolicyExpirationRule" + ROLE_MANAGEMENT_POLICY_NOTIFICATION_RULE = "RoleManagementPolicyNotificationRule" + + class SelectorKind(str, Enum): """ The selector kind. @@ -198,3 +260,11 @@ class SelectorKind(str, Enum): """ The selector kind to filter policies by the policy definition reference ID. """ + + +class UserType(str, Enum): + """ + The type of user. + """ + USER = "User" + GROUP = "Group" diff --git a/sdk/python/pulumi_azure_native/authorization/_inputs.py b/sdk/python/pulumi_azure_native/authorization/_inputs.py index 3355736d4b52..734efd3d5421 100644 --- a/sdk/python/pulumi_azure_native/authorization/_inputs.py +++ b/sdk/python/pulumi_azure_native/authorization/_inputs.py @@ -15,6 +15,8 @@ 'AccessReviewInstanceArgs', 'AccessReviewReviewerArgs', 'AccessReviewScopeArgs', + 'ApprovalSettingsArgs', + 'ApprovalStageArgs', 'IdentityArgs', 'ManagementLockOwnerArgs', 'NonComplianceMessageArgs', @@ -29,7 +31,14 @@ 'PolicyVariableValueColumnValueArgs', 'PrivateLinkAssociationPropertiesArgs', 'ResourceSelectorArgs', + 'RoleManagementPolicyApprovalRuleArgs', + 'RoleManagementPolicyAuthenticationContextRuleArgs', + 'RoleManagementPolicyEnablementRuleArgs', + 'RoleManagementPolicyExpirationRuleArgs', + 'RoleManagementPolicyNotificationRuleArgs', + 'RoleManagementPolicyRuleTargetArgs', 'SelectorArgs', + 'UserSetArgs', ] @pulumi.input_type @@ -336,6 +345,198 @@ def include_inherited_access(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "include_inherited_access", value) +@pulumi.input_type +class ApprovalSettingsArgs: + def __init__(__self__, *, + approval_mode: Optional[pulumi.Input[Union[str, 'ApprovalMode']]] = None, + approval_stages: Optional[pulumi.Input[Sequence[pulumi.Input['ApprovalStageArgs']]]] = None, + is_approval_required: Optional[pulumi.Input[bool]] = None, + is_approval_required_for_extension: Optional[pulumi.Input[bool]] = None, + is_requestor_justification_required: Optional[pulumi.Input[bool]] = None): + """ + The approval settings. + :param pulumi.Input[Union[str, 'ApprovalMode']] approval_mode: The type of rule + :param pulumi.Input[Sequence[pulumi.Input['ApprovalStageArgs']]] approval_stages: The approval stages of the request. + :param pulumi.Input[bool] is_approval_required: Determines whether approval is required or not. + :param pulumi.Input[bool] is_approval_required_for_extension: Determines whether approval is required for assignment extension. + :param pulumi.Input[bool] is_requestor_justification_required: Determine whether requestor justification is required. + """ + if approval_mode is not None: + pulumi.set(__self__, "approval_mode", approval_mode) + if approval_stages is not None: + pulumi.set(__self__, "approval_stages", approval_stages) + if is_approval_required is not None: + pulumi.set(__self__, "is_approval_required", is_approval_required) + if is_approval_required_for_extension is not None: + pulumi.set(__self__, "is_approval_required_for_extension", is_approval_required_for_extension) + if is_requestor_justification_required is not None: + pulumi.set(__self__, "is_requestor_justification_required", is_requestor_justification_required) + + @property + @pulumi.getter(name="approvalMode") + def approval_mode(self) -> Optional[pulumi.Input[Union[str, 'ApprovalMode']]]: + """ + The type of rule + """ + return pulumi.get(self, "approval_mode") + + @approval_mode.setter + def approval_mode(self, value: Optional[pulumi.Input[Union[str, 'ApprovalMode']]]): + pulumi.set(self, "approval_mode", value) + + @property + @pulumi.getter(name="approvalStages") + def approval_stages(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ApprovalStageArgs']]]]: + """ + The approval stages of the request. + """ + return pulumi.get(self, "approval_stages") + + @approval_stages.setter + def approval_stages(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ApprovalStageArgs']]]]): + pulumi.set(self, "approval_stages", value) + + @property + @pulumi.getter(name="isApprovalRequired") + def is_approval_required(self) -> Optional[pulumi.Input[bool]]: + """ + Determines whether approval is required or not. + """ + return pulumi.get(self, "is_approval_required") + + @is_approval_required.setter + def is_approval_required(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_approval_required", value) + + @property + @pulumi.getter(name="isApprovalRequiredForExtension") + def is_approval_required_for_extension(self) -> Optional[pulumi.Input[bool]]: + """ + Determines whether approval is required for assignment extension. + """ + return pulumi.get(self, "is_approval_required_for_extension") + + @is_approval_required_for_extension.setter + def is_approval_required_for_extension(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_approval_required_for_extension", value) + + @property + @pulumi.getter(name="isRequestorJustificationRequired") + def is_requestor_justification_required(self) -> Optional[pulumi.Input[bool]]: + """ + Determine whether requestor justification is required. + """ + return pulumi.get(self, "is_requestor_justification_required") + + @is_requestor_justification_required.setter + def is_requestor_justification_required(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_requestor_justification_required", value) + + +@pulumi.input_type +class ApprovalStageArgs: + def __init__(__self__, *, + approval_stage_time_out_in_days: Optional[pulumi.Input[int]] = None, + escalation_approvers: Optional[pulumi.Input[Sequence[pulumi.Input['UserSetArgs']]]] = None, + escalation_time_in_minutes: Optional[pulumi.Input[int]] = None, + is_approver_justification_required: Optional[pulumi.Input[bool]] = None, + is_escalation_enabled: Optional[pulumi.Input[bool]] = None, + primary_approvers: Optional[pulumi.Input[Sequence[pulumi.Input['UserSetArgs']]]] = None): + """ + The approval stage. + :param pulumi.Input[int] approval_stage_time_out_in_days: The time in days when approval request would be timed out + :param pulumi.Input[Sequence[pulumi.Input['UserSetArgs']]] escalation_approvers: The escalation approver of the request. + :param pulumi.Input[int] escalation_time_in_minutes: The time in minutes when the approval request would be escalated if the primary approver does not approve + :param pulumi.Input[bool] is_approver_justification_required: Determines whether approver need to provide justification for his decision. + :param pulumi.Input[bool] is_escalation_enabled: The value determine whether escalation feature is enabled. + :param pulumi.Input[Sequence[pulumi.Input['UserSetArgs']]] primary_approvers: The primary approver of the request. + """ + if approval_stage_time_out_in_days is not None: + pulumi.set(__self__, "approval_stage_time_out_in_days", approval_stage_time_out_in_days) + if escalation_approvers is not None: + pulumi.set(__self__, "escalation_approvers", escalation_approvers) + if escalation_time_in_minutes is not None: + pulumi.set(__self__, "escalation_time_in_minutes", escalation_time_in_minutes) + if is_approver_justification_required is not None: + pulumi.set(__self__, "is_approver_justification_required", is_approver_justification_required) + if is_escalation_enabled is not None: + pulumi.set(__self__, "is_escalation_enabled", is_escalation_enabled) + if primary_approvers is not None: + pulumi.set(__self__, "primary_approvers", primary_approvers) + + @property + @pulumi.getter(name="approvalStageTimeOutInDays") + def approval_stage_time_out_in_days(self) -> Optional[pulumi.Input[int]]: + """ + The time in days when approval request would be timed out + """ + return pulumi.get(self, "approval_stage_time_out_in_days") + + @approval_stage_time_out_in_days.setter + def approval_stage_time_out_in_days(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "approval_stage_time_out_in_days", value) + + @property + @pulumi.getter(name="escalationApprovers") + def escalation_approvers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['UserSetArgs']]]]: + """ + The escalation approver of the request. + """ + return pulumi.get(self, "escalation_approvers") + + @escalation_approvers.setter + def escalation_approvers(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['UserSetArgs']]]]): + pulumi.set(self, "escalation_approvers", value) + + @property + @pulumi.getter(name="escalationTimeInMinutes") + def escalation_time_in_minutes(self) -> Optional[pulumi.Input[int]]: + """ + The time in minutes when the approval request would be escalated if the primary approver does not approve + """ + return pulumi.get(self, "escalation_time_in_minutes") + + @escalation_time_in_minutes.setter + def escalation_time_in_minutes(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "escalation_time_in_minutes", value) + + @property + @pulumi.getter(name="isApproverJustificationRequired") + def is_approver_justification_required(self) -> Optional[pulumi.Input[bool]]: + """ + Determines whether approver need to provide justification for his decision. + """ + return pulumi.get(self, "is_approver_justification_required") + + @is_approver_justification_required.setter + def is_approver_justification_required(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_approver_justification_required", value) + + @property + @pulumi.getter(name="isEscalationEnabled") + def is_escalation_enabled(self) -> Optional[pulumi.Input[bool]]: + """ + The value determine whether escalation feature is enabled. + """ + return pulumi.get(self, "is_escalation_enabled") + + @is_escalation_enabled.setter + def is_escalation_enabled(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_escalation_enabled", value) + + @property + @pulumi.getter(name="primaryApprovers") + def primary_approvers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['UserSetArgs']]]]: + """ + The primary approver of the request. + """ + return pulumi.get(self, "primary_approvers") + + @primary_approvers.setter + def primary_approvers(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['UserSetArgs']]]]): + pulumi.set(self, "primary_approvers", value) + + @pulumi.input_type class IdentityArgs: def __init__(__self__, *, @@ -1045,6 +1246,571 @@ def selectors(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['Selector pulumi.set(self, "selectors", value) +@pulumi.input_type +class RoleManagementPolicyApprovalRuleArgs: + def __init__(__self__, *, + rule_type: pulumi.Input[str], + id: Optional[pulumi.Input[str]] = None, + setting: Optional[pulumi.Input['ApprovalSettingsArgs']] = None, + target: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']] = None): + """ + The role management policy approval rule. + :param pulumi.Input[str] rule_type: The type of rule + Expected value is 'RoleManagementPolicyApprovalRule'. + :param pulumi.Input[str] id: The id of the rule. + :param pulumi.Input['ApprovalSettingsArgs'] setting: The approval setting + :param pulumi.Input['RoleManagementPolicyRuleTargetArgs'] target: The target of the current rule. + """ + pulumi.set(__self__, "rule_type", 'RoleManagementPolicyApprovalRule') + if id is not None: + pulumi.set(__self__, "id", id) + if setting is not None: + pulumi.set(__self__, "setting", setting) + if target is not None: + pulumi.set(__self__, "target", target) + + @property + @pulumi.getter(name="ruleType") + def rule_type(self) -> pulumi.Input[str]: + """ + The type of rule + Expected value is 'RoleManagementPolicyApprovalRule'. + """ + return pulumi.get(self, "rule_type") + + @rule_type.setter + def rule_type(self, value: pulumi.Input[str]): + pulumi.set(self, "rule_type", value) + + @property + @pulumi.getter + def id(self) -> Optional[pulumi.Input[str]]: + """ + The id of the rule. + """ + return pulumi.get(self, "id") + + @id.setter + def id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "id", value) + + @property + @pulumi.getter + def setting(self) -> Optional[pulumi.Input['ApprovalSettingsArgs']]: + """ + The approval setting + """ + return pulumi.get(self, "setting") + + @setting.setter + def setting(self, value: Optional[pulumi.Input['ApprovalSettingsArgs']]): + pulumi.set(self, "setting", value) + + @property + @pulumi.getter + def target(self) -> Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]: + """ + The target of the current rule. + """ + return pulumi.get(self, "target") + + @target.setter + def target(self, value: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]): + pulumi.set(self, "target", value) + + +@pulumi.input_type +class RoleManagementPolicyAuthenticationContextRuleArgs: + def __init__(__self__, *, + rule_type: pulumi.Input[str], + claim_value: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + is_enabled: Optional[pulumi.Input[bool]] = None, + target: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']] = None): + """ + The role management policy authentication context rule. + :param pulumi.Input[str] rule_type: The type of rule + Expected value is 'RoleManagementPolicyAuthenticationContextRule'. + :param pulumi.Input[str] claim_value: The claim value. + :param pulumi.Input[str] id: The id of the rule. + :param pulumi.Input[bool] is_enabled: The value indicating if rule is enabled. + :param pulumi.Input['RoleManagementPolicyRuleTargetArgs'] target: The target of the current rule. + """ + pulumi.set(__self__, "rule_type", 'RoleManagementPolicyAuthenticationContextRule') + if claim_value is not None: + pulumi.set(__self__, "claim_value", claim_value) + if id is not None: + pulumi.set(__self__, "id", id) + if is_enabled is not None: + pulumi.set(__self__, "is_enabled", is_enabled) + if target is not None: + pulumi.set(__self__, "target", target) + + @property + @pulumi.getter(name="ruleType") + def rule_type(self) -> pulumi.Input[str]: + """ + The type of rule + Expected value is 'RoleManagementPolicyAuthenticationContextRule'. + """ + return pulumi.get(self, "rule_type") + + @rule_type.setter + def rule_type(self, value: pulumi.Input[str]): + pulumi.set(self, "rule_type", value) + + @property + @pulumi.getter(name="claimValue") + def claim_value(self) -> Optional[pulumi.Input[str]]: + """ + The claim value. + """ + return pulumi.get(self, "claim_value") + + @claim_value.setter + def claim_value(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "claim_value", value) + + @property + @pulumi.getter + def id(self) -> Optional[pulumi.Input[str]]: + """ + The id of the rule. + """ + return pulumi.get(self, "id") + + @id.setter + def id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "id", value) + + @property + @pulumi.getter(name="isEnabled") + def is_enabled(self) -> Optional[pulumi.Input[bool]]: + """ + The value indicating if rule is enabled. + """ + return pulumi.get(self, "is_enabled") + + @is_enabled.setter + def is_enabled(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_enabled", value) + + @property + @pulumi.getter + def target(self) -> Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]: + """ + The target of the current rule. + """ + return pulumi.get(self, "target") + + @target.setter + def target(self, value: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]): + pulumi.set(self, "target", value) + + +@pulumi.input_type +class RoleManagementPolicyEnablementRuleArgs: + def __init__(__self__, *, + rule_type: pulumi.Input[str], + enabled_rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union[str, 'EnablementRules']]]]] = None, + id: Optional[pulumi.Input[str]] = None, + target: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']] = None): + """ + The role management policy enablement rule. + :param pulumi.Input[str] rule_type: The type of rule + Expected value is 'RoleManagementPolicyEnablementRule'. + :param pulumi.Input[Sequence[pulumi.Input[Union[str, 'EnablementRules']]]] enabled_rules: The list of enabled rules. + :param pulumi.Input[str] id: The id of the rule. + :param pulumi.Input['RoleManagementPolicyRuleTargetArgs'] target: The target of the current rule. + """ + pulumi.set(__self__, "rule_type", 'RoleManagementPolicyEnablementRule') + if enabled_rules is not None: + pulumi.set(__self__, "enabled_rules", enabled_rules) + if id is not None: + pulumi.set(__self__, "id", id) + if target is not None: + pulumi.set(__self__, "target", target) + + @property + @pulumi.getter(name="ruleType") + def rule_type(self) -> pulumi.Input[str]: + """ + The type of rule + Expected value is 'RoleManagementPolicyEnablementRule'. + """ + return pulumi.get(self, "rule_type") + + @rule_type.setter + def rule_type(self, value: pulumi.Input[str]): + pulumi.set(self, "rule_type", value) + + @property + @pulumi.getter(name="enabledRules") + def enabled_rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[Union[str, 'EnablementRules']]]]]: + """ + The list of enabled rules. + """ + return pulumi.get(self, "enabled_rules") + + @enabled_rules.setter + def enabled_rules(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[Union[str, 'EnablementRules']]]]]): + pulumi.set(self, "enabled_rules", value) + + @property + @pulumi.getter + def id(self) -> Optional[pulumi.Input[str]]: + """ + The id of the rule. + """ + return pulumi.get(self, "id") + + @id.setter + def id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "id", value) + + @property + @pulumi.getter + def target(self) -> Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]: + """ + The target of the current rule. + """ + return pulumi.get(self, "target") + + @target.setter + def target(self, value: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]): + pulumi.set(self, "target", value) + + +@pulumi.input_type +class RoleManagementPolicyExpirationRuleArgs: + def __init__(__self__, *, + rule_type: pulumi.Input[str], + id: Optional[pulumi.Input[str]] = None, + is_expiration_required: Optional[pulumi.Input[bool]] = None, + maximum_duration: Optional[pulumi.Input[str]] = None, + target: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']] = None): + """ + The role management policy expiration rule. + :param pulumi.Input[str] rule_type: The type of rule + Expected value is 'RoleManagementPolicyExpirationRule'. + :param pulumi.Input[str] id: The id of the rule. + :param pulumi.Input[bool] is_expiration_required: The value indicating whether expiration is required. + :param pulumi.Input[str] maximum_duration: The maximum duration of expiration in timespan. + :param pulumi.Input['RoleManagementPolicyRuleTargetArgs'] target: The target of the current rule. + """ + pulumi.set(__self__, "rule_type", 'RoleManagementPolicyExpirationRule') + if id is not None: + pulumi.set(__self__, "id", id) + if is_expiration_required is not None: + pulumi.set(__self__, "is_expiration_required", is_expiration_required) + if maximum_duration is not None: + pulumi.set(__self__, "maximum_duration", maximum_duration) + if target is not None: + pulumi.set(__self__, "target", target) + + @property + @pulumi.getter(name="ruleType") + def rule_type(self) -> pulumi.Input[str]: + """ + The type of rule + Expected value is 'RoleManagementPolicyExpirationRule'. + """ + return pulumi.get(self, "rule_type") + + @rule_type.setter + def rule_type(self, value: pulumi.Input[str]): + pulumi.set(self, "rule_type", value) + + @property + @pulumi.getter + def id(self) -> Optional[pulumi.Input[str]]: + """ + The id of the rule. + """ + return pulumi.get(self, "id") + + @id.setter + def id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "id", value) + + @property + @pulumi.getter(name="isExpirationRequired") + def is_expiration_required(self) -> Optional[pulumi.Input[bool]]: + """ + The value indicating whether expiration is required. + """ + return pulumi.get(self, "is_expiration_required") + + @is_expiration_required.setter + def is_expiration_required(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_expiration_required", value) + + @property + @pulumi.getter(name="maximumDuration") + def maximum_duration(self) -> Optional[pulumi.Input[str]]: + """ + The maximum duration of expiration in timespan. + """ + return pulumi.get(self, "maximum_duration") + + @maximum_duration.setter + def maximum_duration(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "maximum_duration", value) + + @property + @pulumi.getter + def target(self) -> Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]: + """ + The target of the current rule. + """ + return pulumi.get(self, "target") + + @target.setter + def target(self, value: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]): + pulumi.set(self, "target", value) + + +@pulumi.input_type +class RoleManagementPolicyNotificationRuleArgs: + def __init__(__self__, *, + rule_type: pulumi.Input[str], + id: Optional[pulumi.Input[str]] = None, + is_default_recipients_enabled: Optional[pulumi.Input[bool]] = None, + notification_level: Optional[pulumi.Input[Union[str, 'NotificationLevel']]] = None, + notification_recipients: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + notification_type: Optional[pulumi.Input[Union[str, 'NotificationDeliveryMechanism']]] = None, + recipient_type: Optional[pulumi.Input[Union[str, 'RecipientType']]] = None, + target: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']] = None): + """ + The role management policy notification rule. + :param pulumi.Input[str] rule_type: The type of rule + Expected value is 'RoleManagementPolicyNotificationRule'. + :param pulumi.Input[str] id: The id of the rule. + :param pulumi.Input[bool] is_default_recipients_enabled: Determines if the notification will be sent to the recipient type specified in the policy rule. + :param pulumi.Input[Union[str, 'NotificationLevel']] notification_level: The notification level. + :param pulumi.Input[Sequence[pulumi.Input[str]]] notification_recipients: The list of notification recipients. + :param pulumi.Input[Union[str, 'NotificationDeliveryMechanism']] notification_type: The type of notification. + :param pulumi.Input[Union[str, 'RecipientType']] recipient_type: The recipient type. + :param pulumi.Input['RoleManagementPolicyRuleTargetArgs'] target: The target of the current rule. + """ + pulumi.set(__self__, "rule_type", 'RoleManagementPolicyNotificationRule') + if id is not None: + pulumi.set(__self__, "id", id) + if is_default_recipients_enabled is not None: + pulumi.set(__self__, "is_default_recipients_enabled", is_default_recipients_enabled) + if notification_level is not None: + pulumi.set(__self__, "notification_level", notification_level) + if notification_recipients is not None: + pulumi.set(__self__, "notification_recipients", notification_recipients) + if notification_type is not None: + pulumi.set(__self__, "notification_type", notification_type) + if recipient_type is not None: + pulumi.set(__self__, "recipient_type", recipient_type) + if target is not None: + pulumi.set(__self__, "target", target) + + @property + @pulumi.getter(name="ruleType") + def rule_type(self) -> pulumi.Input[str]: + """ + The type of rule + Expected value is 'RoleManagementPolicyNotificationRule'. + """ + return pulumi.get(self, "rule_type") + + @rule_type.setter + def rule_type(self, value: pulumi.Input[str]): + pulumi.set(self, "rule_type", value) + + @property + @pulumi.getter + def id(self) -> Optional[pulumi.Input[str]]: + """ + The id of the rule. + """ + return pulumi.get(self, "id") + + @id.setter + def id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "id", value) + + @property + @pulumi.getter(name="isDefaultRecipientsEnabled") + def is_default_recipients_enabled(self) -> Optional[pulumi.Input[bool]]: + """ + Determines if the notification will be sent to the recipient type specified in the policy rule. + """ + return pulumi.get(self, "is_default_recipients_enabled") + + @is_default_recipients_enabled.setter + def is_default_recipients_enabled(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_default_recipients_enabled", value) + + @property + @pulumi.getter(name="notificationLevel") + def notification_level(self) -> Optional[pulumi.Input[Union[str, 'NotificationLevel']]]: + """ + The notification level. + """ + return pulumi.get(self, "notification_level") + + @notification_level.setter + def notification_level(self, value: Optional[pulumi.Input[Union[str, 'NotificationLevel']]]): + pulumi.set(self, "notification_level", value) + + @property + @pulumi.getter(name="notificationRecipients") + def notification_recipients(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + The list of notification recipients. + """ + return pulumi.get(self, "notification_recipients") + + @notification_recipients.setter + def notification_recipients(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "notification_recipients", value) + + @property + @pulumi.getter(name="notificationType") + def notification_type(self) -> Optional[pulumi.Input[Union[str, 'NotificationDeliveryMechanism']]]: + """ + The type of notification. + """ + return pulumi.get(self, "notification_type") + + @notification_type.setter + def notification_type(self, value: Optional[pulumi.Input[Union[str, 'NotificationDeliveryMechanism']]]): + pulumi.set(self, "notification_type", value) + + @property + @pulumi.getter(name="recipientType") + def recipient_type(self) -> Optional[pulumi.Input[Union[str, 'RecipientType']]]: + """ + The recipient type. + """ + return pulumi.get(self, "recipient_type") + + @recipient_type.setter + def recipient_type(self, value: Optional[pulumi.Input[Union[str, 'RecipientType']]]): + pulumi.set(self, "recipient_type", value) + + @property + @pulumi.getter + def target(self) -> Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]: + """ + The target of the current rule. + """ + return pulumi.get(self, "target") + + @target.setter + def target(self, value: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]): + pulumi.set(self, "target", value) + + +@pulumi.input_type +class RoleManagementPolicyRuleTargetArgs: + def __init__(__self__, *, + caller: Optional[pulumi.Input[str]] = None, + enforced_settings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + inheritable_settings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + level: Optional[pulumi.Input[str]] = None, + operations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + target_objects: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None): + """ + The role management policy rule target. + :param pulumi.Input[str] caller: The caller of the setting. + :param pulumi.Input[Sequence[pulumi.Input[str]]] enforced_settings: The list of enforced settings. + :param pulumi.Input[Sequence[pulumi.Input[str]]] inheritable_settings: The list of inheritable settings. + :param pulumi.Input[str] level: The assignment level to which rule is applied. + :param pulumi.Input[Sequence[pulumi.Input[str]]] operations: The type of operation. + :param pulumi.Input[Sequence[pulumi.Input[str]]] target_objects: The list of target objects. + """ + if caller is not None: + pulumi.set(__self__, "caller", caller) + if enforced_settings is not None: + pulumi.set(__self__, "enforced_settings", enforced_settings) + if inheritable_settings is not None: + pulumi.set(__self__, "inheritable_settings", inheritable_settings) + if level is not None: + pulumi.set(__self__, "level", level) + if operations is not None: + pulumi.set(__self__, "operations", operations) + if target_objects is not None: + pulumi.set(__self__, "target_objects", target_objects) + + @property + @pulumi.getter + def caller(self) -> Optional[pulumi.Input[str]]: + """ + The caller of the setting. + """ + return pulumi.get(self, "caller") + + @caller.setter + def caller(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "caller", value) + + @property + @pulumi.getter(name="enforcedSettings") + def enforced_settings(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + The list of enforced settings. + """ + return pulumi.get(self, "enforced_settings") + + @enforced_settings.setter + def enforced_settings(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "enforced_settings", value) + + @property + @pulumi.getter(name="inheritableSettings") + def inheritable_settings(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + The list of inheritable settings. + """ + return pulumi.get(self, "inheritable_settings") + + @inheritable_settings.setter + def inheritable_settings(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "inheritable_settings", value) + + @property + @pulumi.getter + def level(self) -> Optional[pulumi.Input[str]]: + """ + The assignment level to which rule is applied. + """ + return pulumi.get(self, "level") + + @level.setter + def level(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "level", value) + + @property + @pulumi.getter + def operations(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + The type of operation. + """ + return pulumi.get(self, "operations") + + @operations.setter + def operations(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "operations", value) + + @property + @pulumi.getter(name="targetObjects") + def target_objects(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + The list of target objects. + """ + return pulumi.get(self, "target_objects") + + @target_objects.setter + def target_objects(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "target_objects", value) + + @pulumi.input_type class SelectorArgs: def __init__(__self__, *, @@ -1101,3 +1867,75 @@ def not_in(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): pulumi.set(self, "not_in", value) +@pulumi.input_type +class UserSetArgs: + def __init__(__self__, *, + description: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + is_backup: Optional[pulumi.Input[bool]] = None, + user_type: Optional[pulumi.Input[Union[str, 'UserType']]] = None): + """ + The detail of a user. + :param pulumi.Input[str] description: The description of the user. + :param pulumi.Input[str] id: The object id of the user. + :param pulumi.Input[bool] is_backup: The value indicating whether the user is a backup fallback approver + :param pulumi.Input[Union[str, 'UserType']] user_type: The type of user. + """ + if description is not None: + pulumi.set(__self__, "description", description) + if id is not None: + pulumi.set(__self__, "id", id) + if is_backup is not None: + pulumi.set(__self__, "is_backup", is_backup) + if user_type is not None: + pulumi.set(__self__, "user_type", user_type) + + @property + @pulumi.getter + def description(self) -> Optional[pulumi.Input[str]]: + """ + The description of the user. + """ + return pulumi.get(self, "description") + + @description.setter + def description(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "description", value) + + @property + @pulumi.getter + def id(self) -> Optional[pulumi.Input[str]]: + """ + The object id of the user. + """ + return pulumi.get(self, "id") + + @id.setter + def id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "id", value) + + @property + @pulumi.getter(name="isBackup") + def is_backup(self) -> Optional[pulumi.Input[bool]]: + """ + The value indicating whether the user is a backup fallback approver + """ + return pulumi.get(self, "is_backup") + + @is_backup.setter + def is_backup(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_backup", value) + + @property + @pulumi.getter(name="userType") + def user_type(self) -> Optional[pulumi.Input[Union[str, 'UserType']]]: + """ + The type of user. + """ + return pulumi.get(self, "user_type") + + @user_type.setter + def user_type(self, value: Optional[pulumi.Input[Union[str, 'UserType']]]): + pulumi.set(self, "user_type", value) + + diff --git a/sdk/python/pulumi_azure_native/authorization/get_role_management_policy.py b/sdk/python/pulumi_azure_native/authorization/get_role_management_policy.py new file mode 100644 index 000000000000..43a3eee3f540 --- /dev/null +++ b/sdk/python/pulumi_azure_native/authorization/get_role_management_policy.py @@ -0,0 +1,228 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumi-language-python. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from .. import _utilities +from . import outputs + +__all__ = [ + 'GetRoleManagementPolicyResult', + 'AwaitableGetRoleManagementPolicyResult', + 'get_role_management_policy', + 'get_role_management_policy_output', +] + +@pulumi.output_type +class GetRoleManagementPolicyResult: + """ + Role management policy + """ + def __init__(__self__, description=None, display_name=None, effective_rules=None, id=None, is_organization_default=None, last_modified_by=None, last_modified_date_time=None, name=None, policy_properties=None, rules=None, scope=None, type=None): + if description and not isinstance(description, str): + raise TypeError("Expected argument 'description' to be a str") + pulumi.set(__self__, "description", description) + if display_name and not isinstance(display_name, str): + raise TypeError("Expected argument 'display_name' to be a str") + pulumi.set(__self__, "display_name", display_name) + if effective_rules and not isinstance(effective_rules, list): + raise TypeError("Expected argument 'effective_rules' to be a list") + pulumi.set(__self__, "effective_rules", effective_rules) + if id and not isinstance(id, str): + raise TypeError("Expected argument 'id' to be a str") + pulumi.set(__self__, "id", id) + if is_organization_default and not isinstance(is_organization_default, bool): + raise TypeError("Expected argument 'is_organization_default' to be a bool") + pulumi.set(__self__, "is_organization_default", is_organization_default) + if last_modified_by and not isinstance(last_modified_by, dict): + raise TypeError("Expected argument 'last_modified_by' to be a dict") + pulumi.set(__self__, "last_modified_by", last_modified_by) + if last_modified_date_time and not isinstance(last_modified_date_time, str): + raise TypeError("Expected argument 'last_modified_date_time' to be a str") + pulumi.set(__self__, "last_modified_date_time", last_modified_date_time) + if name and not isinstance(name, str): + raise TypeError("Expected argument 'name' to be a str") + pulumi.set(__self__, "name", name) + if policy_properties and not isinstance(policy_properties, dict): + raise TypeError("Expected argument 'policy_properties' to be a dict") + pulumi.set(__self__, "policy_properties", policy_properties) + if rules and not isinstance(rules, list): + raise TypeError("Expected argument 'rules' to be a list") + pulumi.set(__self__, "rules", rules) + if scope and not isinstance(scope, str): + raise TypeError("Expected argument 'scope' to be a str") + pulumi.set(__self__, "scope", scope) + if type and not isinstance(type, str): + raise TypeError("Expected argument 'type' to be a str") + pulumi.set(__self__, "type", type) + + @property + @pulumi.getter + def description(self) -> Optional[str]: + """ + The role management policy description. + """ + return pulumi.get(self, "description") + + @property + @pulumi.getter(name="displayName") + def display_name(self) -> Optional[str]: + """ + The role management policy display name. + """ + return pulumi.get(self, "display_name") + + @property + @pulumi.getter(name="effectiveRules") + def effective_rules(self) -> Sequence[Any]: + """ + The readonly computed rule applied to the policy. + """ + return pulumi.get(self, "effective_rules") + + @property + @pulumi.getter + def id(self) -> str: + """ + The role management policy Id. + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter(name="isOrganizationDefault") + def is_organization_default(self) -> Optional[bool]: + """ + The role management policy is default policy. + """ + return pulumi.get(self, "is_organization_default") + + @property + @pulumi.getter(name="lastModifiedBy") + def last_modified_by(self) -> 'outputs.PrincipalResponse': + """ + The name of the entity last modified it + """ + return pulumi.get(self, "last_modified_by") + + @property + @pulumi.getter(name="lastModifiedDateTime") + def last_modified_date_time(self) -> str: + """ + The last modified date time. + """ + return pulumi.get(self, "last_modified_date_time") + + @property + @pulumi.getter + def name(self) -> str: + """ + The role management policy name. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter(name="policyProperties") + def policy_properties(self) -> 'outputs.PolicyPropertiesResponse': + """ + Additional properties of scope + """ + return pulumi.get(self, "policy_properties") + + @property + @pulumi.getter + def rules(self) -> Optional[Sequence[Any]]: + """ + The rule applied to the policy. + """ + return pulumi.get(self, "rules") + + @property + @pulumi.getter + def scope(self) -> Optional[str]: + """ + The role management policy scope. + """ + return pulumi.get(self, "scope") + + @property + @pulumi.getter + def type(self) -> str: + """ + The role management policy type. + """ + return pulumi.get(self, "type") + + +class AwaitableGetRoleManagementPolicyResult(GetRoleManagementPolicyResult): + # pylint: disable=using-constant-test + def __await__(self): + if False: + yield self + return GetRoleManagementPolicyResult( + description=self.description, + display_name=self.display_name, + effective_rules=self.effective_rules, + id=self.id, + is_organization_default=self.is_organization_default, + last_modified_by=self.last_modified_by, + last_modified_date_time=self.last_modified_date_time, + name=self.name, + policy_properties=self.policy_properties, + rules=self.rules, + scope=self.scope, + type=self.type) + + +def get_role_management_policy(role_management_policy_name: Optional[str] = None, + scope: Optional[str] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRoleManagementPolicyResult: + """ + Get the specified role management policy for a resource scope + Azure REST API version: 2020-10-01. + + Other available API versions: 2020-10-01-preview. + + + :param str role_management_policy_name: The name (guid) of the role management policy to get. + :param str scope: The scope of the role management policy. + """ + __args__ = dict() + __args__['roleManagementPolicyName'] = role_management_policy_name + __args__['scope'] = scope + opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + __ret__ = pulumi.runtime.invoke('azure-native:authorization:getRoleManagementPolicy', __args__, opts=opts, typ=GetRoleManagementPolicyResult).value + + return AwaitableGetRoleManagementPolicyResult( + description=pulumi.get(__ret__, 'description'), + display_name=pulumi.get(__ret__, 'display_name'), + effective_rules=pulumi.get(__ret__, 'effective_rules'), + id=pulumi.get(__ret__, 'id'), + is_organization_default=pulumi.get(__ret__, 'is_organization_default'), + last_modified_by=pulumi.get(__ret__, 'last_modified_by'), + last_modified_date_time=pulumi.get(__ret__, 'last_modified_date_time'), + name=pulumi.get(__ret__, 'name'), + policy_properties=pulumi.get(__ret__, 'policy_properties'), + rules=pulumi.get(__ret__, 'rules'), + scope=pulumi.get(__ret__, 'scope'), + type=pulumi.get(__ret__, 'type')) + + +@_utilities.lift_output_func(get_role_management_policy) +def get_role_management_policy_output(role_management_policy_name: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetRoleManagementPolicyResult]: + """ + Get the specified role management policy for a resource scope + Azure REST API version: 2020-10-01. + + Other available API versions: 2020-10-01-preview. + + + :param str role_management_policy_name: The name (guid) of the role management policy to get. + :param str scope: The scope of the role management policy. + """ + ... diff --git a/sdk/python/pulumi_azure_native/authorization/outputs.py b/sdk/python/pulumi_azure_native/authorization/outputs.py index b9cd851505cd..c32f168ff478 100644 --- a/sdk/python/pulumi_azure_native/authorization/outputs.py +++ b/sdk/python/pulumi_azure_native/authorization/outputs.py @@ -34,6 +34,8 @@ 'PolicyDefinitionGroupResponse', 'PolicyDefinitionReferenceResponse', 'PolicyDefinitionVersionResponse', + 'PolicyPropertiesResponse', + 'PolicyPropertiesResponseScope', 'PolicySetDefinitionVersionResponse', 'PolicyVariableColumnResponse', 'PolicyVariableValueColumnValueResponse', @@ -1914,6 +1916,92 @@ def version(self) -> Optional[str]: return pulumi.get(self, "version") +@pulumi.output_type +class PolicyPropertiesResponse(dict): + """ + Expanded info of resource scope + """ + def __init__(__self__, *, + scope: 'outputs.PolicyPropertiesResponseScope'): + """ + Expanded info of resource scope + :param 'PolicyPropertiesResponseScope' scope: Details of the resource scope + """ + pulumi.set(__self__, "scope", scope) + + @property + @pulumi.getter + def scope(self) -> 'outputs.PolicyPropertiesResponseScope': + """ + Details of the resource scope + """ + return pulumi.get(self, "scope") + + +@pulumi.output_type +class PolicyPropertiesResponseScope(dict): + """ + Details of the resource scope + """ + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "displayName": + suggest = "display_name" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in PolicyPropertiesResponseScope. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + PolicyPropertiesResponseScope.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + PolicyPropertiesResponseScope.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + display_name: Optional[str] = None, + id: Optional[str] = None, + type: Optional[str] = None): + """ + Details of the resource scope + :param str display_name: Display name of the resource + :param str id: Scope id of the resource + :param str type: Type of the resource + """ + if display_name is not None: + pulumi.set(__self__, "display_name", display_name) + if id is not None: + pulumi.set(__self__, "id", id) + if type is not None: + pulumi.set(__self__, "type", type) + + @property + @pulumi.getter(name="displayName") + def display_name(self) -> Optional[str]: + """ + Display name of the resource + """ + return pulumi.get(self, "display_name") + + @property + @pulumi.getter + def id(self) -> Optional[str]: + """ + Scope id of the resource + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter + def type(self) -> Optional[str]: + """ + Type of the resource + """ + return pulumi.get(self, "type") + + @pulumi.output_type class PolicySetDefinitionVersionResponse(dict): """ diff --git a/sdk/python/pulumi_azure_native/authorization/role_management_policy.py b/sdk/python/pulumi_azure_native/authorization/role_management_policy.py new file mode 100644 index 000000000000..4f706de56560 --- /dev/null +++ b/sdk/python/pulumi_azure_native/authorization/role_management_policy.py @@ -0,0 +1,327 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumi-language-python. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from .. import _utilities +from . import outputs +from ._enums import * +from ._inputs import * + +__all__ = ['RoleManagementPolicyArgs', 'RoleManagementPolicy'] + +@pulumi.input_type +class RoleManagementPolicyArgs: + def __init__(__self__, *, + scope: pulumi.Input[str], + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + is_organization_default: Optional[pulumi.Input[bool]] = None, + role_management_policy_name: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RoleManagementPolicyApprovalRuleArgs', 'RoleManagementPolicyAuthenticationContextRuleArgs', 'RoleManagementPolicyEnablementRuleArgs', 'RoleManagementPolicyExpirationRuleArgs', 'RoleManagementPolicyNotificationRuleArgs']]]]] = None): + """ + The set of arguments for constructing a RoleManagementPolicy resource. + :param pulumi.Input[str] scope: The role management policy scope. + :param pulumi.Input[str] description: The role management policy description. + :param pulumi.Input[str] display_name: The role management policy display name. + :param pulumi.Input[bool] is_organization_default: The role management policy is default policy. + :param pulumi.Input[str] role_management_policy_name: The name (guid) of the role management policy to upsert. + :param pulumi.Input[Sequence[pulumi.Input[Union['RoleManagementPolicyApprovalRuleArgs', 'RoleManagementPolicyAuthenticationContextRuleArgs', 'RoleManagementPolicyEnablementRuleArgs', 'RoleManagementPolicyExpirationRuleArgs', 'RoleManagementPolicyNotificationRuleArgs']]]] rules: The rule applied to the policy. + """ + pulumi.set(__self__, "scope", scope) + if description is not None: + pulumi.set(__self__, "description", description) + if display_name is not None: + pulumi.set(__self__, "display_name", display_name) + if is_organization_default is not None: + pulumi.set(__self__, "is_organization_default", is_organization_default) + if role_management_policy_name is not None: + pulumi.set(__self__, "role_management_policy_name", role_management_policy_name) + if rules is not None: + pulumi.set(__self__, "rules", rules) + + @property + @pulumi.getter + def scope(self) -> pulumi.Input[str]: + """ + The role management policy scope. + """ + return pulumi.get(self, "scope") + + @scope.setter + def scope(self, value: pulumi.Input[str]): + pulumi.set(self, "scope", value) + + @property + @pulumi.getter + def description(self) -> Optional[pulumi.Input[str]]: + """ + The role management policy description. + """ + return pulumi.get(self, "description") + + @description.setter + def description(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "description", value) + + @property + @pulumi.getter(name="displayName") + def display_name(self) -> Optional[pulumi.Input[str]]: + """ + The role management policy display name. + """ + return pulumi.get(self, "display_name") + + @display_name.setter + def display_name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "display_name", value) + + @property + @pulumi.getter(name="isOrganizationDefault") + def is_organization_default(self) -> Optional[pulumi.Input[bool]]: + """ + The role management policy is default policy. + """ + return pulumi.get(self, "is_organization_default") + + @is_organization_default.setter + def is_organization_default(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_organization_default", value) + + @property + @pulumi.getter(name="roleManagementPolicyName") + def role_management_policy_name(self) -> Optional[pulumi.Input[str]]: + """ + The name (guid) of the role management policy to upsert. + """ + return pulumi.get(self, "role_management_policy_name") + + @role_management_policy_name.setter + def role_management_policy_name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "role_management_policy_name", value) + + @property + @pulumi.getter + def rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[Union['RoleManagementPolicyApprovalRuleArgs', 'RoleManagementPolicyAuthenticationContextRuleArgs', 'RoleManagementPolicyEnablementRuleArgs', 'RoleManagementPolicyExpirationRuleArgs', 'RoleManagementPolicyNotificationRuleArgs']]]]]: + """ + The rule applied to the policy. + """ + return pulumi.get(self, "rules") + + @rules.setter + def rules(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RoleManagementPolicyApprovalRuleArgs', 'RoleManagementPolicyAuthenticationContextRuleArgs', 'RoleManagementPolicyEnablementRuleArgs', 'RoleManagementPolicyExpirationRuleArgs', 'RoleManagementPolicyNotificationRuleArgs']]]]]): + pulumi.set(self, "rules", value) + + +class RoleManagementPolicy(pulumi.CustomResource): + @overload + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + is_organization_default: Optional[pulumi.Input[bool]] = None, + role_management_policy_name: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union[pulumi.InputType['RoleManagementPolicyApprovalRuleArgs'], pulumi.InputType['RoleManagementPolicyAuthenticationContextRuleArgs'], pulumi.InputType['RoleManagementPolicyEnablementRuleArgs'], pulumi.InputType['RoleManagementPolicyExpirationRuleArgs'], pulumi.InputType['RoleManagementPolicyNotificationRuleArgs']]]]]] = None, + scope: Optional[pulumi.Input[str]] = None, + __props__=None): + """ + Role management policy + Azure REST API version: 2020-10-01. + + Other available API versions: 2020-10-01-preview. + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] description: The role management policy description. + :param pulumi.Input[str] display_name: The role management policy display name. + :param pulumi.Input[bool] is_organization_default: The role management policy is default policy. + :param pulumi.Input[str] role_management_policy_name: The name (guid) of the role management policy to upsert. + :param pulumi.Input[Sequence[pulumi.Input[Union[pulumi.InputType['RoleManagementPolicyApprovalRuleArgs'], pulumi.InputType['RoleManagementPolicyAuthenticationContextRuleArgs'], pulumi.InputType['RoleManagementPolicyEnablementRuleArgs'], pulumi.InputType['RoleManagementPolicyExpirationRuleArgs'], pulumi.InputType['RoleManagementPolicyNotificationRuleArgs']]]]] rules: The rule applied to the policy. + :param pulumi.Input[str] scope: The role management policy scope. + """ + ... + @overload + def __init__(__self__, + resource_name: str, + args: RoleManagementPolicyArgs, + opts: Optional[pulumi.ResourceOptions] = None): + """ + Role management policy + Azure REST API version: 2020-10-01. + + Other available API versions: 2020-10-01-preview. + + :param str resource_name: The name of the resource. + :param RoleManagementPolicyArgs args: The arguments to use to populate this resource's properties. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + ... + def __init__(__self__, resource_name: str, *args, **kwargs): + resource_args, opts = _utilities.get_resource_args_opts(RoleManagementPolicyArgs, pulumi.ResourceOptions, *args, **kwargs) + if resource_args is not None: + __self__._internal_init(resource_name, opts, **resource_args.__dict__) + else: + __self__._internal_init(resource_name, *args, **kwargs) + + def _internal_init(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + is_organization_default: Optional[pulumi.Input[bool]] = None, + role_management_policy_name: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union[pulumi.InputType['RoleManagementPolicyApprovalRuleArgs'], pulumi.InputType['RoleManagementPolicyAuthenticationContextRuleArgs'], pulumi.InputType['RoleManagementPolicyEnablementRuleArgs'], pulumi.InputType['RoleManagementPolicyExpirationRuleArgs'], pulumi.InputType['RoleManagementPolicyNotificationRuleArgs']]]]]] = None, + scope: Optional[pulumi.Input[str]] = None, + __props__=None): + opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = RoleManagementPolicyArgs.__new__(RoleManagementPolicyArgs) + + __props__.__dict__["description"] = description + __props__.__dict__["display_name"] = display_name + __props__.__dict__["is_organization_default"] = is_organization_default + __props__.__dict__["role_management_policy_name"] = role_management_policy_name + __props__.__dict__["rules"] = rules + if scope is None and not opts.urn: + raise TypeError("Missing required property 'scope'") + __props__.__dict__["scope"] = scope + __props__.__dict__["effective_rules"] = None + __props__.__dict__["last_modified_by"] = None + __props__.__dict__["last_modified_date_time"] = None + __props__.__dict__["name"] = None + __props__.__dict__["policy_properties"] = None + __props__.__dict__["type"] = None + alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="azure-native:authorization/v20201001:RoleManagementPolicy"), pulumi.Alias(type_="azure-native:authorization/v20201001preview:RoleManagementPolicy")]) + opts = pulumi.ResourceOptions.merge(opts, alias_opts) + super(RoleManagementPolicy, __self__).__init__( + 'azure-native:authorization:RoleManagementPolicy', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None) -> 'RoleManagementPolicy': + """ + Get an existing RoleManagementPolicy resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = RoleManagementPolicyArgs.__new__(RoleManagementPolicyArgs) + + __props__.__dict__["description"] = None + __props__.__dict__["display_name"] = None + __props__.__dict__["effective_rules"] = None + __props__.__dict__["is_organization_default"] = None + __props__.__dict__["last_modified_by"] = None + __props__.__dict__["last_modified_date_time"] = None + __props__.__dict__["name"] = None + __props__.__dict__["policy_properties"] = None + __props__.__dict__["rules"] = None + __props__.__dict__["scope"] = None + __props__.__dict__["type"] = None + return RoleManagementPolicy(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter + def description(self) -> pulumi.Output[Optional[str]]: + """ + The role management policy description. + """ + return pulumi.get(self, "description") + + @property + @pulumi.getter(name="displayName") + def display_name(self) -> pulumi.Output[Optional[str]]: + """ + The role management policy display name. + """ + return pulumi.get(self, "display_name") + + @property + @pulumi.getter(name="effectiveRules") + def effective_rules(self) -> pulumi.Output[Sequence[Any]]: + """ + The readonly computed rule applied to the policy. + """ + return pulumi.get(self, "effective_rules") + + @property + @pulumi.getter(name="isOrganizationDefault") + def is_organization_default(self) -> pulumi.Output[Optional[bool]]: + """ + The role management policy is default policy. + """ + return pulumi.get(self, "is_organization_default") + + @property + @pulumi.getter(name="lastModifiedBy") + def last_modified_by(self) -> pulumi.Output['outputs.PrincipalResponse']: + """ + The name of the entity last modified it + """ + return pulumi.get(self, "last_modified_by") + + @property + @pulumi.getter(name="lastModifiedDateTime") + def last_modified_date_time(self) -> pulumi.Output[str]: + """ + The last modified date time. + """ + return pulumi.get(self, "last_modified_date_time") + + @property + @pulumi.getter + def name(self) -> pulumi.Output[str]: + """ + The role management policy name. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter(name="policyProperties") + def policy_properties(self) -> pulumi.Output['outputs.PolicyPropertiesResponse']: + """ + Additional properties of scope + """ + return pulumi.get(self, "policy_properties") + + @property + @pulumi.getter + def rules(self) -> pulumi.Output[Optional[Sequence[Any]]]: + """ + The rule applied to the policy. + """ + return pulumi.get(self, "rules") + + @property + @pulumi.getter + def scope(self) -> pulumi.Output[Optional[str]]: + """ + The role management policy scope. + """ + return pulumi.get(self, "scope") + + @property + @pulumi.getter + def type(self) -> pulumi.Output[str]: + """ + The role management policy type. + """ + return pulumi.get(self, "type") + diff --git a/sdk/python/pulumi_azure_native/authorization/v20201001/__init__.py b/sdk/python/pulumi_azure_native/authorization/v20201001/__init__.py index 764078306785..c9d9f0f2f5ee 100644 --- a/sdk/python/pulumi_azure_native/authorization/v20201001/__init__.py +++ b/sdk/python/pulumi_azure_native/authorization/v20201001/__init__.py @@ -5,6 +5,10 @@ from ... import _utilities import typing # Export this package's modules as members: +from ._enums import * +from .get_role_management_policy import * from .get_role_management_policy_assignment import * +from .role_management_policy import * from .role_management_policy_assignment import * +from ._inputs import * from . import outputs diff --git a/sdk/python/pulumi_azure_native/authorization/v20201001/_enums.py b/sdk/python/pulumi_azure_native/authorization/v20201001/_enums.py new file mode 100644 index 000000000000..2b41faf3d574 --- /dev/null +++ b/sdk/python/pulumi_azure_native/authorization/v20201001/_enums.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumi-language-python. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +from enum import Enum + +__all__ = [ + 'ApprovalMode', + 'EnablementRules', + 'NotificationDeliveryMechanism', + 'NotificationLevel', + 'RecipientType', + 'RoleManagementPolicyRuleType', + 'UserType', +] + + +class ApprovalMode(str, Enum): + """ + The type of rule + """ + SINGLE_STAGE = "SingleStage" + SERIAL = "Serial" + PARALLEL = "Parallel" + NO_APPROVAL = "NoApproval" + + +class EnablementRules(str, Enum): + """ + The type of enablement rule + """ + MULTI_FACTOR_AUTHENTICATION = "MultiFactorAuthentication" + JUSTIFICATION = "Justification" + TICKETING = "Ticketing" + + +class NotificationDeliveryMechanism(str, Enum): + """ + The type of notification. + """ + EMAIL = "Email" + + +class NotificationLevel(str, Enum): + """ + The notification level. + """ + NONE = "None" + CRITICAL = "Critical" + ALL = "All" + + +class RecipientType(str, Enum): + """ + The recipient type. + """ + REQUESTOR = "Requestor" + APPROVER = "Approver" + ADMIN = "Admin" + + +class RoleManagementPolicyRuleType(str, Enum): + """ + The type of rule + """ + ROLE_MANAGEMENT_POLICY_APPROVAL_RULE = "RoleManagementPolicyApprovalRule" + ROLE_MANAGEMENT_POLICY_AUTHENTICATION_CONTEXT_RULE = "RoleManagementPolicyAuthenticationContextRule" + ROLE_MANAGEMENT_POLICY_ENABLEMENT_RULE = "RoleManagementPolicyEnablementRule" + ROLE_MANAGEMENT_POLICY_EXPIRATION_RULE = "RoleManagementPolicyExpirationRule" + ROLE_MANAGEMENT_POLICY_NOTIFICATION_RULE = "RoleManagementPolicyNotificationRule" + + +class UserType(str, Enum): + """ + The type of user. + """ + USER = "User" + GROUP = "Group" diff --git a/sdk/python/pulumi_azure_native/authorization/v20201001/_inputs.py b/sdk/python/pulumi_azure_native/authorization/v20201001/_inputs.py new file mode 100644 index 000000000000..71e4ffbc328f --- /dev/null +++ b/sdk/python/pulumi_azure_native/authorization/v20201001/_inputs.py @@ -0,0 +1,853 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumi-language-python. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from ... import _utilities +from ._enums import * + +__all__ = [ + 'ApprovalSettingsArgs', + 'ApprovalStageArgs', + 'RoleManagementPolicyApprovalRuleArgs', + 'RoleManagementPolicyAuthenticationContextRuleArgs', + 'RoleManagementPolicyEnablementRuleArgs', + 'RoleManagementPolicyExpirationRuleArgs', + 'RoleManagementPolicyNotificationRuleArgs', + 'RoleManagementPolicyRuleTargetArgs', + 'UserSetArgs', +] + +@pulumi.input_type +class ApprovalSettingsArgs: + def __init__(__self__, *, + approval_mode: Optional[pulumi.Input[Union[str, 'ApprovalMode']]] = None, + approval_stages: Optional[pulumi.Input[Sequence[pulumi.Input['ApprovalStageArgs']]]] = None, + is_approval_required: Optional[pulumi.Input[bool]] = None, + is_approval_required_for_extension: Optional[pulumi.Input[bool]] = None, + is_requestor_justification_required: Optional[pulumi.Input[bool]] = None): + """ + The approval settings. + :param pulumi.Input[Union[str, 'ApprovalMode']] approval_mode: The type of rule + :param pulumi.Input[Sequence[pulumi.Input['ApprovalStageArgs']]] approval_stages: The approval stages of the request. + :param pulumi.Input[bool] is_approval_required: Determines whether approval is required or not. + :param pulumi.Input[bool] is_approval_required_for_extension: Determines whether approval is required for assignment extension. + :param pulumi.Input[bool] is_requestor_justification_required: Determine whether requestor justification is required. + """ + if approval_mode is not None: + pulumi.set(__self__, "approval_mode", approval_mode) + if approval_stages is not None: + pulumi.set(__self__, "approval_stages", approval_stages) + if is_approval_required is not None: + pulumi.set(__self__, "is_approval_required", is_approval_required) + if is_approval_required_for_extension is not None: + pulumi.set(__self__, "is_approval_required_for_extension", is_approval_required_for_extension) + if is_requestor_justification_required is not None: + pulumi.set(__self__, "is_requestor_justification_required", is_requestor_justification_required) + + @property + @pulumi.getter(name="approvalMode") + def approval_mode(self) -> Optional[pulumi.Input[Union[str, 'ApprovalMode']]]: + """ + The type of rule + """ + return pulumi.get(self, "approval_mode") + + @approval_mode.setter + def approval_mode(self, value: Optional[pulumi.Input[Union[str, 'ApprovalMode']]]): + pulumi.set(self, "approval_mode", value) + + @property + @pulumi.getter(name="approvalStages") + def approval_stages(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ApprovalStageArgs']]]]: + """ + The approval stages of the request. + """ + return pulumi.get(self, "approval_stages") + + @approval_stages.setter + def approval_stages(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ApprovalStageArgs']]]]): + pulumi.set(self, "approval_stages", value) + + @property + @pulumi.getter(name="isApprovalRequired") + def is_approval_required(self) -> Optional[pulumi.Input[bool]]: + """ + Determines whether approval is required or not. + """ + return pulumi.get(self, "is_approval_required") + + @is_approval_required.setter + def is_approval_required(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_approval_required", value) + + @property + @pulumi.getter(name="isApprovalRequiredForExtension") + def is_approval_required_for_extension(self) -> Optional[pulumi.Input[bool]]: + """ + Determines whether approval is required for assignment extension. + """ + return pulumi.get(self, "is_approval_required_for_extension") + + @is_approval_required_for_extension.setter + def is_approval_required_for_extension(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_approval_required_for_extension", value) + + @property + @pulumi.getter(name="isRequestorJustificationRequired") + def is_requestor_justification_required(self) -> Optional[pulumi.Input[bool]]: + """ + Determine whether requestor justification is required. + """ + return pulumi.get(self, "is_requestor_justification_required") + + @is_requestor_justification_required.setter + def is_requestor_justification_required(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_requestor_justification_required", value) + + +@pulumi.input_type +class ApprovalStageArgs: + def __init__(__self__, *, + approval_stage_time_out_in_days: Optional[pulumi.Input[int]] = None, + escalation_approvers: Optional[pulumi.Input[Sequence[pulumi.Input['UserSetArgs']]]] = None, + escalation_time_in_minutes: Optional[pulumi.Input[int]] = None, + is_approver_justification_required: Optional[pulumi.Input[bool]] = None, + is_escalation_enabled: Optional[pulumi.Input[bool]] = None, + primary_approvers: Optional[pulumi.Input[Sequence[pulumi.Input['UserSetArgs']]]] = None): + """ + The approval stage. + :param pulumi.Input[int] approval_stage_time_out_in_days: The time in days when approval request would be timed out + :param pulumi.Input[Sequence[pulumi.Input['UserSetArgs']]] escalation_approvers: The escalation approver of the request. + :param pulumi.Input[int] escalation_time_in_minutes: The time in minutes when the approval request would be escalated if the primary approver does not approve + :param pulumi.Input[bool] is_approver_justification_required: Determines whether approver need to provide justification for his decision. + :param pulumi.Input[bool] is_escalation_enabled: The value determine whether escalation feature is enabled. + :param pulumi.Input[Sequence[pulumi.Input['UserSetArgs']]] primary_approvers: The primary approver of the request. + """ + if approval_stage_time_out_in_days is not None: + pulumi.set(__self__, "approval_stage_time_out_in_days", approval_stage_time_out_in_days) + if escalation_approvers is not None: + pulumi.set(__self__, "escalation_approvers", escalation_approvers) + if escalation_time_in_minutes is not None: + pulumi.set(__self__, "escalation_time_in_minutes", escalation_time_in_minutes) + if is_approver_justification_required is not None: + pulumi.set(__self__, "is_approver_justification_required", is_approver_justification_required) + if is_escalation_enabled is not None: + pulumi.set(__self__, "is_escalation_enabled", is_escalation_enabled) + if primary_approvers is not None: + pulumi.set(__self__, "primary_approvers", primary_approvers) + + @property + @pulumi.getter(name="approvalStageTimeOutInDays") + def approval_stage_time_out_in_days(self) -> Optional[pulumi.Input[int]]: + """ + The time in days when approval request would be timed out + """ + return pulumi.get(self, "approval_stage_time_out_in_days") + + @approval_stage_time_out_in_days.setter + def approval_stage_time_out_in_days(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "approval_stage_time_out_in_days", value) + + @property + @pulumi.getter(name="escalationApprovers") + def escalation_approvers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['UserSetArgs']]]]: + """ + The escalation approver of the request. + """ + return pulumi.get(self, "escalation_approvers") + + @escalation_approvers.setter + def escalation_approvers(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['UserSetArgs']]]]): + pulumi.set(self, "escalation_approvers", value) + + @property + @pulumi.getter(name="escalationTimeInMinutes") + def escalation_time_in_minutes(self) -> Optional[pulumi.Input[int]]: + """ + The time in minutes when the approval request would be escalated if the primary approver does not approve + """ + return pulumi.get(self, "escalation_time_in_minutes") + + @escalation_time_in_minutes.setter + def escalation_time_in_minutes(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "escalation_time_in_minutes", value) + + @property + @pulumi.getter(name="isApproverJustificationRequired") + def is_approver_justification_required(self) -> Optional[pulumi.Input[bool]]: + """ + Determines whether approver need to provide justification for his decision. + """ + return pulumi.get(self, "is_approver_justification_required") + + @is_approver_justification_required.setter + def is_approver_justification_required(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_approver_justification_required", value) + + @property + @pulumi.getter(name="isEscalationEnabled") + def is_escalation_enabled(self) -> Optional[pulumi.Input[bool]]: + """ + The value determine whether escalation feature is enabled. + """ + return pulumi.get(self, "is_escalation_enabled") + + @is_escalation_enabled.setter + def is_escalation_enabled(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_escalation_enabled", value) + + @property + @pulumi.getter(name="primaryApprovers") + def primary_approvers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['UserSetArgs']]]]: + """ + The primary approver of the request. + """ + return pulumi.get(self, "primary_approvers") + + @primary_approvers.setter + def primary_approvers(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['UserSetArgs']]]]): + pulumi.set(self, "primary_approvers", value) + + +@pulumi.input_type +class RoleManagementPolicyApprovalRuleArgs: + def __init__(__self__, *, + rule_type: pulumi.Input[str], + id: Optional[pulumi.Input[str]] = None, + setting: Optional[pulumi.Input['ApprovalSettingsArgs']] = None, + target: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']] = None): + """ + The role management policy approval rule. + :param pulumi.Input[str] rule_type: The type of rule + Expected value is 'RoleManagementPolicyApprovalRule'. + :param pulumi.Input[str] id: The id of the rule. + :param pulumi.Input['ApprovalSettingsArgs'] setting: The approval setting + :param pulumi.Input['RoleManagementPolicyRuleTargetArgs'] target: The target of the current rule. + """ + pulumi.set(__self__, "rule_type", 'RoleManagementPolicyApprovalRule') + if id is not None: + pulumi.set(__self__, "id", id) + if setting is not None: + pulumi.set(__self__, "setting", setting) + if target is not None: + pulumi.set(__self__, "target", target) + + @property + @pulumi.getter(name="ruleType") + def rule_type(self) -> pulumi.Input[str]: + """ + The type of rule + Expected value is 'RoleManagementPolicyApprovalRule'. + """ + return pulumi.get(self, "rule_type") + + @rule_type.setter + def rule_type(self, value: pulumi.Input[str]): + pulumi.set(self, "rule_type", value) + + @property + @pulumi.getter + def id(self) -> Optional[pulumi.Input[str]]: + """ + The id of the rule. + """ + return pulumi.get(self, "id") + + @id.setter + def id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "id", value) + + @property + @pulumi.getter + def setting(self) -> Optional[pulumi.Input['ApprovalSettingsArgs']]: + """ + The approval setting + """ + return pulumi.get(self, "setting") + + @setting.setter + def setting(self, value: Optional[pulumi.Input['ApprovalSettingsArgs']]): + pulumi.set(self, "setting", value) + + @property + @pulumi.getter + def target(self) -> Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]: + """ + The target of the current rule. + """ + return pulumi.get(self, "target") + + @target.setter + def target(self, value: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]): + pulumi.set(self, "target", value) + + +@pulumi.input_type +class RoleManagementPolicyAuthenticationContextRuleArgs: + def __init__(__self__, *, + rule_type: pulumi.Input[str], + claim_value: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + is_enabled: Optional[pulumi.Input[bool]] = None, + target: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']] = None): + """ + The role management policy authentication context rule. + :param pulumi.Input[str] rule_type: The type of rule + Expected value is 'RoleManagementPolicyAuthenticationContextRule'. + :param pulumi.Input[str] claim_value: The claim value. + :param pulumi.Input[str] id: The id of the rule. + :param pulumi.Input[bool] is_enabled: The value indicating if rule is enabled. + :param pulumi.Input['RoleManagementPolicyRuleTargetArgs'] target: The target of the current rule. + """ + pulumi.set(__self__, "rule_type", 'RoleManagementPolicyAuthenticationContextRule') + if claim_value is not None: + pulumi.set(__self__, "claim_value", claim_value) + if id is not None: + pulumi.set(__self__, "id", id) + if is_enabled is not None: + pulumi.set(__self__, "is_enabled", is_enabled) + if target is not None: + pulumi.set(__self__, "target", target) + + @property + @pulumi.getter(name="ruleType") + def rule_type(self) -> pulumi.Input[str]: + """ + The type of rule + Expected value is 'RoleManagementPolicyAuthenticationContextRule'. + """ + return pulumi.get(self, "rule_type") + + @rule_type.setter + def rule_type(self, value: pulumi.Input[str]): + pulumi.set(self, "rule_type", value) + + @property + @pulumi.getter(name="claimValue") + def claim_value(self) -> Optional[pulumi.Input[str]]: + """ + The claim value. + """ + return pulumi.get(self, "claim_value") + + @claim_value.setter + def claim_value(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "claim_value", value) + + @property + @pulumi.getter + def id(self) -> Optional[pulumi.Input[str]]: + """ + The id of the rule. + """ + return pulumi.get(self, "id") + + @id.setter + def id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "id", value) + + @property + @pulumi.getter(name="isEnabled") + def is_enabled(self) -> Optional[pulumi.Input[bool]]: + """ + The value indicating if rule is enabled. + """ + return pulumi.get(self, "is_enabled") + + @is_enabled.setter + def is_enabled(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_enabled", value) + + @property + @pulumi.getter + def target(self) -> Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]: + """ + The target of the current rule. + """ + return pulumi.get(self, "target") + + @target.setter + def target(self, value: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]): + pulumi.set(self, "target", value) + + +@pulumi.input_type +class RoleManagementPolicyEnablementRuleArgs: + def __init__(__self__, *, + rule_type: pulumi.Input[str], + enabled_rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union[str, 'EnablementRules']]]]] = None, + id: Optional[pulumi.Input[str]] = None, + target: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']] = None): + """ + The role management policy enablement rule. + :param pulumi.Input[str] rule_type: The type of rule + Expected value is 'RoleManagementPolicyEnablementRule'. + :param pulumi.Input[Sequence[pulumi.Input[Union[str, 'EnablementRules']]]] enabled_rules: The list of enabled rules. + :param pulumi.Input[str] id: The id of the rule. + :param pulumi.Input['RoleManagementPolicyRuleTargetArgs'] target: The target of the current rule. + """ + pulumi.set(__self__, "rule_type", 'RoleManagementPolicyEnablementRule') + if enabled_rules is not None: + pulumi.set(__self__, "enabled_rules", enabled_rules) + if id is not None: + pulumi.set(__self__, "id", id) + if target is not None: + pulumi.set(__self__, "target", target) + + @property + @pulumi.getter(name="ruleType") + def rule_type(self) -> pulumi.Input[str]: + """ + The type of rule + Expected value is 'RoleManagementPolicyEnablementRule'. + """ + return pulumi.get(self, "rule_type") + + @rule_type.setter + def rule_type(self, value: pulumi.Input[str]): + pulumi.set(self, "rule_type", value) + + @property + @pulumi.getter(name="enabledRules") + def enabled_rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[Union[str, 'EnablementRules']]]]]: + """ + The list of enabled rules. + """ + return pulumi.get(self, "enabled_rules") + + @enabled_rules.setter + def enabled_rules(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[Union[str, 'EnablementRules']]]]]): + pulumi.set(self, "enabled_rules", value) + + @property + @pulumi.getter + def id(self) -> Optional[pulumi.Input[str]]: + """ + The id of the rule. + """ + return pulumi.get(self, "id") + + @id.setter + def id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "id", value) + + @property + @pulumi.getter + def target(self) -> Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]: + """ + The target of the current rule. + """ + return pulumi.get(self, "target") + + @target.setter + def target(self, value: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]): + pulumi.set(self, "target", value) + + +@pulumi.input_type +class RoleManagementPolicyExpirationRuleArgs: + def __init__(__self__, *, + rule_type: pulumi.Input[str], + id: Optional[pulumi.Input[str]] = None, + is_expiration_required: Optional[pulumi.Input[bool]] = None, + maximum_duration: Optional[pulumi.Input[str]] = None, + target: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']] = None): + """ + The role management policy expiration rule. + :param pulumi.Input[str] rule_type: The type of rule + Expected value is 'RoleManagementPolicyExpirationRule'. + :param pulumi.Input[str] id: The id of the rule. + :param pulumi.Input[bool] is_expiration_required: The value indicating whether expiration is required. + :param pulumi.Input[str] maximum_duration: The maximum duration of expiration in timespan. + :param pulumi.Input['RoleManagementPolicyRuleTargetArgs'] target: The target of the current rule. + """ + pulumi.set(__self__, "rule_type", 'RoleManagementPolicyExpirationRule') + if id is not None: + pulumi.set(__self__, "id", id) + if is_expiration_required is not None: + pulumi.set(__self__, "is_expiration_required", is_expiration_required) + if maximum_duration is not None: + pulumi.set(__self__, "maximum_duration", maximum_duration) + if target is not None: + pulumi.set(__self__, "target", target) + + @property + @pulumi.getter(name="ruleType") + def rule_type(self) -> pulumi.Input[str]: + """ + The type of rule + Expected value is 'RoleManagementPolicyExpirationRule'. + """ + return pulumi.get(self, "rule_type") + + @rule_type.setter + def rule_type(self, value: pulumi.Input[str]): + pulumi.set(self, "rule_type", value) + + @property + @pulumi.getter + def id(self) -> Optional[pulumi.Input[str]]: + """ + The id of the rule. + """ + return pulumi.get(self, "id") + + @id.setter + def id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "id", value) + + @property + @pulumi.getter(name="isExpirationRequired") + def is_expiration_required(self) -> Optional[pulumi.Input[bool]]: + """ + The value indicating whether expiration is required. + """ + return pulumi.get(self, "is_expiration_required") + + @is_expiration_required.setter + def is_expiration_required(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_expiration_required", value) + + @property + @pulumi.getter(name="maximumDuration") + def maximum_duration(self) -> Optional[pulumi.Input[str]]: + """ + The maximum duration of expiration in timespan. + """ + return pulumi.get(self, "maximum_duration") + + @maximum_duration.setter + def maximum_duration(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "maximum_duration", value) + + @property + @pulumi.getter + def target(self) -> Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]: + """ + The target of the current rule. + """ + return pulumi.get(self, "target") + + @target.setter + def target(self, value: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]): + pulumi.set(self, "target", value) + + +@pulumi.input_type +class RoleManagementPolicyNotificationRuleArgs: + def __init__(__self__, *, + rule_type: pulumi.Input[str], + id: Optional[pulumi.Input[str]] = None, + is_default_recipients_enabled: Optional[pulumi.Input[bool]] = None, + notification_level: Optional[pulumi.Input[Union[str, 'NotificationLevel']]] = None, + notification_recipients: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + notification_type: Optional[pulumi.Input[Union[str, 'NotificationDeliveryMechanism']]] = None, + recipient_type: Optional[pulumi.Input[Union[str, 'RecipientType']]] = None, + target: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']] = None): + """ + The role management policy notification rule. + :param pulumi.Input[str] rule_type: The type of rule + Expected value is 'RoleManagementPolicyNotificationRule'. + :param pulumi.Input[str] id: The id of the rule. + :param pulumi.Input[bool] is_default_recipients_enabled: Determines if the notification will be sent to the recipient type specified in the policy rule. + :param pulumi.Input[Union[str, 'NotificationLevel']] notification_level: The notification level. + :param pulumi.Input[Sequence[pulumi.Input[str]]] notification_recipients: The list of notification recipients. + :param pulumi.Input[Union[str, 'NotificationDeliveryMechanism']] notification_type: The type of notification. + :param pulumi.Input[Union[str, 'RecipientType']] recipient_type: The recipient type. + :param pulumi.Input['RoleManagementPolicyRuleTargetArgs'] target: The target of the current rule. + """ + pulumi.set(__self__, "rule_type", 'RoleManagementPolicyNotificationRule') + if id is not None: + pulumi.set(__self__, "id", id) + if is_default_recipients_enabled is not None: + pulumi.set(__self__, "is_default_recipients_enabled", is_default_recipients_enabled) + if notification_level is not None: + pulumi.set(__self__, "notification_level", notification_level) + if notification_recipients is not None: + pulumi.set(__self__, "notification_recipients", notification_recipients) + if notification_type is not None: + pulumi.set(__self__, "notification_type", notification_type) + if recipient_type is not None: + pulumi.set(__self__, "recipient_type", recipient_type) + if target is not None: + pulumi.set(__self__, "target", target) + + @property + @pulumi.getter(name="ruleType") + def rule_type(self) -> pulumi.Input[str]: + """ + The type of rule + Expected value is 'RoleManagementPolicyNotificationRule'. + """ + return pulumi.get(self, "rule_type") + + @rule_type.setter + def rule_type(self, value: pulumi.Input[str]): + pulumi.set(self, "rule_type", value) + + @property + @pulumi.getter + def id(self) -> Optional[pulumi.Input[str]]: + """ + The id of the rule. + """ + return pulumi.get(self, "id") + + @id.setter + def id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "id", value) + + @property + @pulumi.getter(name="isDefaultRecipientsEnabled") + def is_default_recipients_enabled(self) -> Optional[pulumi.Input[bool]]: + """ + Determines if the notification will be sent to the recipient type specified in the policy rule. + """ + return pulumi.get(self, "is_default_recipients_enabled") + + @is_default_recipients_enabled.setter + def is_default_recipients_enabled(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_default_recipients_enabled", value) + + @property + @pulumi.getter(name="notificationLevel") + def notification_level(self) -> Optional[pulumi.Input[Union[str, 'NotificationLevel']]]: + """ + The notification level. + """ + return pulumi.get(self, "notification_level") + + @notification_level.setter + def notification_level(self, value: Optional[pulumi.Input[Union[str, 'NotificationLevel']]]): + pulumi.set(self, "notification_level", value) + + @property + @pulumi.getter(name="notificationRecipients") + def notification_recipients(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + The list of notification recipients. + """ + return pulumi.get(self, "notification_recipients") + + @notification_recipients.setter + def notification_recipients(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "notification_recipients", value) + + @property + @pulumi.getter(name="notificationType") + def notification_type(self) -> Optional[pulumi.Input[Union[str, 'NotificationDeliveryMechanism']]]: + """ + The type of notification. + """ + return pulumi.get(self, "notification_type") + + @notification_type.setter + def notification_type(self, value: Optional[pulumi.Input[Union[str, 'NotificationDeliveryMechanism']]]): + pulumi.set(self, "notification_type", value) + + @property + @pulumi.getter(name="recipientType") + def recipient_type(self) -> Optional[pulumi.Input[Union[str, 'RecipientType']]]: + """ + The recipient type. + """ + return pulumi.get(self, "recipient_type") + + @recipient_type.setter + def recipient_type(self, value: Optional[pulumi.Input[Union[str, 'RecipientType']]]): + pulumi.set(self, "recipient_type", value) + + @property + @pulumi.getter + def target(self) -> Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]: + """ + The target of the current rule. + """ + return pulumi.get(self, "target") + + @target.setter + def target(self, value: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]): + pulumi.set(self, "target", value) + + +@pulumi.input_type +class RoleManagementPolicyRuleTargetArgs: + def __init__(__self__, *, + caller: Optional[pulumi.Input[str]] = None, + enforced_settings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + inheritable_settings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + level: Optional[pulumi.Input[str]] = None, + operations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + target_objects: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None): + """ + The role management policy rule target. + :param pulumi.Input[str] caller: The caller of the setting. + :param pulumi.Input[Sequence[pulumi.Input[str]]] enforced_settings: The list of enforced settings. + :param pulumi.Input[Sequence[pulumi.Input[str]]] inheritable_settings: The list of inheritable settings. + :param pulumi.Input[str] level: The assignment level to which rule is applied. + :param pulumi.Input[Sequence[pulumi.Input[str]]] operations: The type of operation. + :param pulumi.Input[Sequence[pulumi.Input[str]]] target_objects: The list of target objects. + """ + if caller is not None: + pulumi.set(__self__, "caller", caller) + if enforced_settings is not None: + pulumi.set(__self__, "enforced_settings", enforced_settings) + if inheritable_settings is not None: + pulumi.set(__self__, "inheritable_settings", inheritable_settings) + if level is not None: + pulumi.set(__self__, "level", level) + if operations is not None: + pulumi.set(__self__, "operations", operations) + if target_objects is not None: + pulumi.set(__self__, "target_objects", target_objects) + + @property + @pulumi.getter + def caller(self) -> Optional[pulumi.Input[str]]: + """ + The caller of the setting. + """ + return pulumi.get(self, "caller") + + @caller.setter + def caller(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "caller", value) + + @property + @pulumi.getter(name="enforcedSettings") + def enforced_settings(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + The list of enforced settings. + """ + return pulumi.get(self, "enforced_settings") + + @enforced_settings.setter + def enforced_settings(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "enforced_settings", value) + + @property + @pulumi.getter(name="inheritableSettings") + def inheritable_settings(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + The list of inheritable settings. + """ + return pulumi.get(self, "inheritable_settings") + + @inheritable_settings.setter + def inheritable_settings(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "inheritable_settings", value) + + @property + @pulumi.getter + def level(self) -> Optional[pulumi.Input[str]]: + """ + The assignment level to which rule is applied. + """ + return pulumi.get(self, "level") + + @level.setter + def level(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "level", value) + + @property + @pulumi.getter + def operations(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + The type of operation. + """ + return pulumi.get(self, "operations") + + @operations.setter + def operations(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "operations", value) + + @property + @pulumi.getter(name="targetObjects") + def target_objects(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + The list of target objects. + """ + return pulumi.get(self, "target_objects") + + @target_objects.setter + def target_objects(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "target_objects", value) + + +@pulumi.input_type +class UserSetArgs: + def __init__(__self__, *, + description: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + is_backup: Optional[pulumi.Input[bool]] = None, + user_type: Optional[pulumi.Input[Union[str, 'UserType']]] = None): + """ + The detail of a user. + :param pulumi.Input[str] description: The description of the user. + :param pulumi.Input[str] id: The object id of the user. + :param pulumi.Input[bool] is_backup: The value indicating whether the user is a backup fallback approver + :param pulumi.Input[Union[str, 'UserType']] user_type: The type of user. + """ + if description is not None: + pulumi.set(__self__, "description", description) + if id is not None: + pulumi.set(__self__, "id", id) + if is_backup is not None: + pulumi.set(__self__, "is_backup", is_backup) + if user_type is not None: + pulumi.set(__self__, "user_type", user_type) + + @property + @pulumi.getter + def description(self) -> Optional[pulumi.Input[str]]: + """ + The description of the user. + """ + return pulumi.get(self, "description") + + @description.setter + def description(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "description", value) + + @property + @pulumi.getter + def id(self) -> Optional[pulumi.Input[str]]: + """ + The object id of the user. + """ + return pulumi.get(self, "id") + + @id.setter + def id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "id", value) + + @property + @pulumi.getter(name="isBackup") + def is_backup(self) -> Optional[pulumi.Input[bool]]: + """ + The value indicating whether the user is a backup fallback approver + """ + return pulumi.get(self, "is_backup") + + @is_backup.setter + def is_backup(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_backup", value) + + @property + @pulumi.getter(name="userType") + def user_type(self) -> Optional[pulumi.Input[Union[str, 'UserType']]]: + """ + The type of user. + """ + return pulumi.get(self, "user_type") + + @user_type.setter + def user_type(self, value: Optional[pulumi.Input[Union[str, 'UserType']]]): + pulumi.set(self, "user_type", value) + + diff --git a/sdk/python/pulumi_azure_native/authorization/v20201001/get_role_management_policy.py b/sdk/python/pulumi_azure_native/authorization/v20201001/get_role_management_policy.py new file mode 100644 index 000000000000..07ebcb5c88e1 --- /dev/null +++ b/sdk/python/pulumi_azure_native/authorization/v20201001/get_role_management_policy.py @@ -0,0 +1,222 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumi-language-python. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from ... import _utilities +from . import outputs + +__all__ = [ + 'GetRoleManagementPolicyResult', + 'AwaitableGetRoleManagementPolicyResult', + 'get_role_management_policy', + 'get_role_management_policy_output', +] + +@pulumi.output_type +class GetRoleManagementPolicyResult: + """ + Role management policy + """ + def __init__(__self__, description=None, display_name=None, effective_rules=None, id=None, is_organization_default=None, last_modified_by=None, last_modified_date_time=None, name=None, policy_properties=None, rules=None, scope=None, type=None): + if description and not isinstance(description, str): + raise TypeError("Expected argument 'description' to be a str") + pulumi.set(__self__, "description", description) + if display_name and not isinstance(display_name, str): + raise TypeError("Expected argument 'display_name' to be a str") + pulumi.set(__self__, "display_name", display_name) + if effective_rules and not isinstance(effective_rules, list): + raise TypeError("Expected argument 'effective_rules' to be a list") + pulumi.set(__self__, "effective_rules", effective_rules) + if id and not isinstance(id, str): + raise TypeError("Expected argument 'id' to be a str") + pulumi.set(__self__, "id", id) + if is_organization_default and not isinstance(is_organization_default, bool): + raise TypeError("Expected argument 'is_organization_default' to be a bool") + pulumi.set(__self__, "is_organization_default", is_organization_default) + if last_modified_by and not isinstance(last_modified_by, dict): + raise TypeError("Expected argument 'last_modified_by' to be a dict") + pulumi.set(__self__, "last_modified_by", last_modified_by) + if last_modified_date_time and not isinstance(last_modified_date_time, str): + raise TypeError("Expected argument 'last_modified_date_time' to be a str") + pulumi.set(__self__, "last_modified_date_time", last_modified_date_time) + if name and not isinstance(name, str): + raise TypeError("Expected argument 'name' to be a str") + pulumi.set(__self__, "name", name) + if policy_properties and not isinstance(policy_properties, dict): + raise TypeError("Expected argument 'policy_properties' to be a dict") + pulumi.set(__self__, "policy_properties", policy_properties) + if rules and not isinstance(rules, list): + raise TypeError("Expected argument 'rules' to be a list") + pulumi.set(__self__, "rules", rules) + if scope and not isinstance(scope, str): + raise TypeError("Expected argument 'scope' to be a str") + pulumi.set(__self__, "scope", scope) + if type and not isinstance(type, str): + raise TypeError("Expected argument 'type' to be a str") + pulumi.set(__self__, "type", type) + + @property + @pulumi.getter + def description(self) -> Optional[str]: + """ + The role management policy description. + """ + return pulumi.get(self, "description") + + @property + @pulumi.getter(name="displayName") + def display_name(self) -> Optional[str]: + """ + The role management policy display name. + """ + return pulumi.get(self, "display_name") + + @property + @pulumi.getter(name="effectiveRules") + def effective_rules(self) -> Sequence[Any]: + """ + The readonly computed rule applied to the policy. + """ + return pulumi.get(self, "effective_rules") + + @property + @pulumi.getter + def id(self) -> str: + """ + The role management policy Id. + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter(name="isOrganizationDefault") + def is_organization_default(self) -> Optional[bool]: + """ + The role management policy is default policy. + """ + return pulumi.get(self, "is_organization_default") + + @property + @pulumi.getter(name="lastModifiedBy") + def last_modified_by(self) -> 'outputs.PrincipalResponse': + """ + The name of the entity last modified it + """ + return pulumi.get(self, "last_modified_by") + + @property + @pulumi.getter(name="lastModifiedDateTime") + def last_modified_date_time(self) -> str: + """ + The last modified date time. + """ + return pulumi.get(self, "last_modified_date_time") + + @property + @pulumi.getter + def name(self) -> str: + """ + The role management policy name. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter(name="policyProperties") + def policy_properties(self) -> 'outputs.PolicyPropertiesResponse': + """ + Additional properties of scope + """ + return pulumi.get(self, "policy_properties") + + @property + @pulumi.getter + def rules(self) -> Optional[Sequence[Any]]: + """ + The rule applied to the policy. + """ + return pulumi.get(self, "rules") + + @property + @pulumi.getter + def scope(self) -> Optional[str]: + """ + The role management policy scope. + """ + return pulumi.get(self, "scope") + + @property + @pulumi.getter + def type(self) -> str: + """ + The role management policy type. + """ + return pulumi.get(self, "type") + + +class AwaitableGetRoleManagementPolicyResult(GetRoleManagementPolicyResult): + # pylint: disable=using-constant-test + def __await__(self): + if False: + yield self + return GetRoleManagementPolicyResult( + description=self.description, + display_name=self.display_name, + effective_rules=self.effective_rules, + id=self.id, + is_organization_default=self.is_organization_default, + last_modified_by=self.last_modified_by, + last_modified_date_time=self.last_modified_date_time, + name=self.name, + policy_properties=self.policy_properties, + rules=self.rules, + scope=self.scope, + type=self.type) + + +def get_role_management_policy(role_management_policy_name: Optional[str] = None, + scope: Optional[str] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRoleManagementPolicyResult: + """ + Get the specified role management policy for a resource scope + + + :param str role_management_policy_name: The name (guid) of the role management policy to get. + :param str scope: The scope of the role management policy. + """ + __args__ = dict() + __args__['roleManagementPolicyName'] = role_management_policy_name + __args__['scope'] = scope + opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + __ret__ = pulumi.runtime.invoke('azure-native:authorization/v20201001:getRoleManagementPolicy', __args__, opts=opts, typ=GetRoleManagementPolicyResult).value + + return AwaitableGetRoleManagementPolicyResult( + description=pulumi.get(__ret__, 'description'), + display_name=pulumi.get(__ret__, 'display_name'), + effective_rules=pulumi.get(__ret__, 'effective_rules'), + id=pulumi.get(__ret__, 'id'), + is_organization_default=pulumi.get(__ret__, 'is_organization_default'), + last_modified_by=pulumi.get(__ret__, 'last_modified_by'), + last_modified_date_time=pulumi.get(__ret__, 'last_modified_date_time'), + name=pulumi.get(__ret__, 'name'), + policy_properties=pulumi.get(__ret__, 'policy_properties'), + rules=pulumi.get(__ret__, 'rules'), + scope=pulumi.get(__ret__, 'scope'), + type=pulumi.get(__ret__, 'type')) + + +@_utilities.lift_output_func(get_role_management_policy) +def get_role_management_policy_output(role_management_policy_name: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetRoleManagementPolicyResult]: + """ + Get the specified role management policy for a resource scope + + + :param str role_management_policy_name: The name (guid) of the role management policy to get. + :param str scope: The scope of the role management policy. + """ + ... diff --git a/sdk/python/pulumi_azure_native/authorization/v20201001/outputs.py b/sdk/python/pulumi_azure_native/authorization/v20201001/outputs.py index e2b28e93ac97..4973c4ce2ad9 100644 --- a/sdk/python/pulumi_azure_native/authorization/v20201001/outputs.py +++ b/sdk/python/pulumi_azure_native/authorization/v20201001/outputs.py @@ -9,6 +9,7 @@ from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs +from ._enums import * __all__ = [ 'ApprovalSettingsResponse', @@ -17,6 +18,8 @@ 'PolicyAssignmentPropertiesResponsePolicy', 'PolicyAssignmentPropertiesResponseRoleDefinition', 'PolicyAssignmentPropertiesResponseScope', + 'PolicyPropertiesResponse', + 'PolicyPropertiesResponseScope', 'PrincipalResponse', 'RoleManagementPolicyApprovalRuleResponse', 'RoleManagementPolicyAuthenticationContextRuleResponse', @@ -490,6 +493,92 @@ def type(self) -> Optional[str]: return pulumi.get(self, "type") +@pulumi.output_type +class PolicyPropertiesResponse(dict): + """ + Expanded info of resource scope + """ + def __init__(__self__, *, + scope: 'outputs.PolicyPropertiesResponseScope'): + """ + Expanded info of resource scope + :param 'PolicyPropertiesResponseScope' scope: Details of the resource scope + """ + pulumi.set(__self__, "scope", scope) + + @property + @pulumi.getter + def scope(self) -> 'outputs.PolicyPropertiesResponseScope': + """ + Details of the resource scope + """ + return pulumi.get(self, "scope") + + +@pulumi.output_type +class PolicyPropertiesResponseScope(dict): + """ + Details of the resource scope + """ + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "displayName": + suggest = "display_name" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in PolicyPropertiesResponseScope. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + PolicyPropertiesResponseScope.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + PolicyPropertiesResponseScope.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + display_name: Optional[str] = None, + id: Optional[str] = None, + type: Optional[str] = None): + """ + Details of the resource scope + :param str display_name: Display name of the resource + :param str id: Scope id of the resource + :param str type: Type of the resource + """ + if display_name is not None: + pulumi.set(__self__, "display_name", display_name) + if id is not None: + pulumi.set(__self__, "id", id) + if type is not None: + pulumi.set(__self__, "type", type) + + @property + @pulumi.getter(name="displayName") + def display_name(self) -> Optional[str]: + """ + Display name of the resource + """ + return pulumi.get(self, "display_name") + + @property + @pulumi.getter + def id(self) -> Optional[str]: + """ + Scope id of the resource + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter + def type(self) -> Optional[str]: + """ + Type of the resource + """ + return pulumi.get(self, "type") + + @pulumi.output_type class PrincipalResponse(dict): """ diff --git a/sdk/python/pulumi_azure_native/authorization/v20201001/role_management_policy.py b/sdk/python/pulumi_azure_native/authorization/v20201001/role_management_policy.py new file mode 100644 index 000000000000..da222c869d90 --- /dev/null +++ b/sdk/python/pulumi_azure_native/authorization/v20201001/role_management_policy.py @@ -0,0 +1,321 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumi-language-python. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from ... import _utilities +from . import outputs +from ._enums import * +from ._inputs import * + +__all__ = ['RoleManagementPolicyArgs', 'RoleManagementPolicy'] + +@pulumi.input_type +class RoleManagementPolicyArgs: + def __init__(__self__, *, + scope: pulumi.Input[str], + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + is_organization_default: Optional[pulumi.Input[bool]] = None, + role_management_policy_name: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RoleManagementPolicyApprovalRuleArgs', 'RoleManagementPolicyAuthenticationContextRuleArgs', 'RoleManagementPolicyEnablementRuleArgs', 'RoleManagementPolicyExpirationRuleArgs', 'RoleManagementPolicyNotificationRuleArgs']]]]] = None): + """ + The set of arguments for constructing a RoleManagementPolicy resource. + :param pulumi.Input[str] scope: The role management policy scope. + :param pulumi.Input[str] description: The role management policy description. + :param pulumi.Input[str] display_name: The role management policy display name. + :param pulumi.Input[bool] is_organization_default: The role management policy is default policy. + :param pulumi.Input[str] role_management_policy_name: The name (guid) of the role management policy to upsert. + :param pulumi.Input[Sequence[pulumi.Input[Union['RoleManagementPolicyApprovalRuleArgs', 'RoleManagementPolicyAuthenticationContextRuleArgs', 'RoleManagementPolicyEnablementRuleArgs', 'RoleManagementPolicyExpirationRuleArgs', 'RoleManagementPolicyNotificationRuleArgs']]]] rules: The rule applied to the policy. + """ + pulumi.set(__self__, "scope", scope) + if description is not None: + pulumi.set(__self__, "description", description) + if display_name is not None: + pulumi.set(__self__, "display_name", display_name) + if is_organization_default is not None: + pulumi.set(__self__, "is_organization_default", is_organization_default) + if role_management_policy_name is not None: + pulumi.set(__self__, "role_management_policy_name", role_management_policy_name) + if rules is not None: + pulumi.set(__self__, "rules", rules) + + @property + @pulumi.getter + def scope(self) -> pulumi.Input[str]: + """ + The role management policy scope. + """ + return pulumi.get(self, "scope") + + @scope.setter + def scope(self, value: pulumi.Input[str]): + pulumi.set(self, "scope", value) + + @property + @pulumi.getter + def description(self) -> Optional[pulumi.Input[str]]: + """ + The role management policy description. + """ + return pulumi.get(self, "description") + + @description.setter + def description(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "description", value) + + @property + @pulumi.getter(name="displayName") + def display_name(self) -> Optional[pulumi.Input[str]]: + """ + The role management policy display name. + """ + return pulumi.get(self, "display_name") + + @display_name.setter + def display_name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "display_name", value) + + @property + @pulumi.getter(name="isOrganizationDefault") + def is_organization_default(self) -> Optional[pulumi.Input[bool]]: + """ + The role management policy is default policy. + """ + return pulumi.get(self, "is_organization_default") + + @is_organization_default.setter + def is_organization_default(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_organization_default", value) + + @property + @pulumi.getter(name="roleManagementPolicyName") + def role_management_policy_name(self) -> Optional[pulumi.Input[str]]: + """ + The name (guid) of the role management policy to upsert. + """ + return pulumi.get(self, "role_management_policy_name") + + @role_management_policy_name.setter + def role_management_policy_name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "role_management_policy_name", value) + + @property + @pulumi.getter + def rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[Union['RoleManagementPolicyApprovalRuleArgs', 'RoleManagementPolicyAuthenticationContextRuleArgs', 'RoleManagementPolicyEnablementRuleArgs', 'RoleManagementPolicyExpirationRuleArgs', 'RoleManagementPolicyNotificationRuleArgs']]]]]: + """ + The rule applied to the policy. + """ + return pulumi.get(self, "rules") + + @rules.setter + def rules(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RoleManagementPolicyApprovalRuleArgs', 'RoleManagementPolicyAuthenticationContextRuleArgs', 'RoleManagementPolicyEnablementRuleArgs', 'RoleManagementPolicyExpirationRuleArgs', 'RoleManagementPolicyNotificationRuleArgs']]]]]): + pulumi.set(self, "rules", value) + + +class RoleManagementPolicy(pulumi.CustomResource): + @overload + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + is_organization_default: Optional[pulumi.Input[bool]] = None, + role_management_policy_name: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union[pulumi.InputType['RoleManagementPolicyApprovalRuleArgs'], pulumi.InputType['RoleManagementPolicyAuthenticationContextRuleArgs'], pulumi.InputType['RoleManagementPolicyEnablementRuleArgs'], pulumi.InputType['RoleManagementPolicyExpirationRuleArgs'], pulumi.InputType['RoleManagementPolicyNotificationRuleArgs']]]]]] = None, + scope: Optional[pulumi.Input[str]] = None, + __props__=None): + """ + Role management policy + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] description: The role management policy description. + :param pulumi.Input[str] display_name: The role management policy display name. + :param pulumi.Input[bool] is_organization_default: The role management policy is default policy. + :param pulumi.Input[str] role_management_policy_name: The name (guid) of the role management policy to upsert. + :param pulumi.Input[Sequence[pulumi.Input[Union[pulumi.InputType['RoleManagementPolicyApprovalRuleArgs'], pulumi.InputType['RoleManagementPolicyAuthenticationContextRuleArgs'], pulumi.InputType['RoleManagementPolicyEnablementRuleArgs'], pulumi.InputType['RoleManagementPolicyExpirationRuleArgs'], pulumi.InputType['RoleManagementPolicyNotificationRuleArgs']]]]] rules: The rule applied to the policy. + :param pulumi.Input[str] scope: The role management policy scope. + """ + ... + @overload + def __init__(__self__, + resource_name: str, + args: RoleManagementPolicyArgs, + opts: Optional[pulumi.ResourceOptions] = None): + """ + Role management policy + + :param str resource_name: The name of the resource. + :param RoleManagementPolicyArgs args: The arguments to use to populate this resource's properties. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + ... + def __init__(__self__, resource_name: str, *args, **kwargs): + resource_args, opts = _utilities.get_resource_args_opts(RoleManagementPolicyArgs, pulumi.ResourceOptions, *args, **kwargs) + if resource_args is not None: + __self__._internal_init(resource_name, opts, **resource_args.__dict__) + else: + __self__._internal_init(resource_name, *args, **kwargs) + + def _internal_init(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + is_organization_default: Optional[pulumi.Input[bool]] = None, + role_management_policy_name: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union[pulumi.InputType['RoleManagementPolicyApprovalRuleArgs'], pulumi.InputType['RoleManagementPolicyAuthenticationContextRuleArgs'], pulumi.InputType['RoleManagementPolicyEnablementRuleArgs'], pulumi.InputType['RoleManagementPolicyExpirationRuleArgs'], pulumi.InputType['RoleManagementPolicyNotificationRuleArgs']]]]]] = None, + scope: Optional[pulumi.Input[str]] = None, + __props__=None): + opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = RoleManagementPolicyArgs.__new__(RoleManagementPolicyArgs) + + __props__.__dict__["description"] = description + __props__.__dict__["display_name"] = display_name + __props__.__dict__["is_organization_default"] = is_organization_default + __props__.__dict__["role_management_policy_name"] = role_management_policy_name + __props__.__dict__["rules"] = rules + if scope is None and not opts.urn: + raise TypeError("Missing required property 'scope'") + __props__.__dict__["scope"] = scope + __props__.__dict__["effective_rules"] = None + __props__.__dict__["last_modified_by"] = None + __props__.__dict__["last_modified_date_time"] = None + __props__.__dict__["name"] = None + __props__.__dict__["policy_properties"] = None + __props__.__dict__["type"] = None + alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="azure-native:authorization:RoleManagementPolicy"), pulumi.Alias(type_="azure-native:authorization/v20201001preview:RoleManagementPolicy")]) + opts = pulumi.ResourceOptions.merge(opts, alias_opts) + super(RoleManagementPolicy, __self__).__init__( + 'azure-native:authorization/v20201001:RoleManagementPolicy', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None) -> 'RoleManagementPolicy': + """ + Get an existing RoleManagementPolicy resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = RoleManagementPolicyArgs.__new__(RoleManagementPolicyArgs) + + __props__.__dict__["description"] = None + __props__.__dict__["display_name"] = None + __props__.__dict__["effective_rules"] = None + __props__.__dict__["is_organization_default"] = None + __props__.__dict__["last_modified_by"] = None + __props__.__dict__["last_modified_date_time"] = None + __props__.__dict__["name"] = None + __props__.__dict__["policy_properties"] = None + __props__.__dict__["rules"] = None + __props__.__dict__["scope"] = None + __props__.__dict__["type"] = None + return RoleManagementPolicy(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter + def description(self) -> pulumi.Output[Optional[str]]: + """ + The role management policy description. + """ + return pulumi.get(self, "description") + + @property + @pulumi.getter(name="displayName") + def display_name(self) -> pulumi.Output[Optional[str]]: + """ + The role management policy display name. + """ + return pulumi.get(self, "display_name") + + @property + @pulumi.getter(name="effectiveRules") + def effective_rules(self) -> pulumi.Output[Sequence[Any]]: + """ + The readonly computed rule applied to the policy. + """ + return pulumi.get(self, "effective_rules") + + @property + @pulumi.getter(name="isOrganizationDefault") + def is_organization_default(self) -> pulumi.Output[Optional[bool]]: + """ + The role management policy is default policy. + """ + return pulumi.get(self, "is_organization_default") + + @property + @pulumi.getter(name="lastModifiedBy") + def last_modified_by(self) -> pulumi.Output['outputs.PrincipalResponse']: + """ + The name of the entity last modified it + """ + return pulumi.get(self, "last_modified_by") + + @property + @pulumi.getter(name="lastModifiedDateTime") + def last_modified_date_time(self) -> pulumi.Output[str]: + """ + The last modified date time. + """ + return pulumi.get(self, "last_modified_date_time") + + @property + @pulumi.getter + def name(self) -> pulumi.Output[str]: + """ + The role management policy name. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter(name="policyProperties") + def policy_properties(self) -> pulumi.Output['outputs.PolicyPropertiesResponse']: + """ + Additional properties of scope + """ + return pulumi.get(self, "policy_properties") + + @property + @pulumi.getter + def rules(self) -> pulumi.Output[Optional[Sequence[Any]]]: + """ + The rule applied to the policy. + """ + return pulumi.get(self, "rules") + + @property + @pulumi.getter + def scope(self) -> pulumi.Output[Optional[str]]: + """ + The role management policy scope. + """ + return pulumi.get(self, "scope") + + @property + @pulumi.getter + def type(self) -> pulumi.Output[str]: + """ + The role management policy type. + """ + return pulumi.get(self, "type") + diff --git a/sdk/python/pulumi_azure_native/authorization/v20201001preview/__init__.py b/sdk/python/pulumi_azure_native/authorization/v20201001preview/__init__.py index 764078306785..c9d9f0f2f5ee 100644 --- a/sdk/python/pulumi_azure_native/authorization/v20201001preview/__init__.py +++ b/sdk/python/pulumi_azure_native/authorization/v20201001preview/__init__.py @@ -5,6 +5,10 @@ from ... import _utilities import typing # Export this package's modules as members: +from ._enums import * +from .get_role_management_policy import * from .get_role_management_policy_assignment import * +from .role_management_policy import * from .role_management_policy_assignment import * +from ._inputs import * from . import outputs diff --git a/sdk/python/pulumi_azure_native/authorization/v20201001preview/_enums.py b/sdk/python/pulumi_azure_native/authorization/v20201001preview/_enums.py new file mode 100644 index 000000000000..2b41faf3d574 --- /dev/null +++ b/sdk/python/pulumi_azure_native/authorization/v20201001preview/_enums.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumi-language-python. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +from enum import Enum + +__all__ = [ + 'ApprovalMode', + 'EnablementRules', + 'NotificationDeliveryMechanism', + 'NotificationLevel', + 'RecipientType', + 'RoleManagementPolicyRuleType', + 'UserType', +] + + +class ApprovalMode(str, Enum): + """ + The type of rule + """ + SINGLE_STAGE = "SingleStage" + SERIAL = "Serial" + PARALLEL = "Parallel" + NO_APPROVAL = "NoApproval" + + +class EnablementRules(str, Enum): + """ + The type of enablement rule + """ + MULTI_FACTOR_AUTHENTICATION = "MultiFactorAuthentication" + JUSTIFICATION = "Justification" + TICKETING = "Ticketing" + + +class NotificationDeliveryMechanism(str, Enum): + """ + The type of notification. + """ + EMAIL = "Email" + + +class NotificationLevel(str, Enum): + """ + The notification level. + """ + NONE = "None" + CRITICAL = "Critical" + ALL = "All" + + +class RecipientType(str, Enum): + """ + The recipient type. + """ + REQUESTOR = "Requestor" + APPROVER = "Approver" + ADMIN = "Admin" + + +class RoleManagementPolicyRuleType(str, Enum): + """ + The type of rule + """ + ROLE_MANAGEMENT_POLICY_APPROVAL_RULE = "RoleManagementPolicyApprovalRule" + ROLE_MANAGEMENT_POLICY_AUTHENTICATION_CONTEXT_RULE = "RoleManagementPolicyAuthenticationContextRule" + ROLE_MANAGEMENT_POLICY_ENABLEMENT_RULE = "RoleManagementPolicyEnablementRule" + ROLE_MANAGEMENT_POLICY_EXPIRATION_RULE = "RoleManagementPolicyExpirationRule" + ROLE_MANAGEMENT_POLICY_NOTIFICATION_RULE = "RoleManagementPolicyNotificationRule" + + +class UserType(str, Enum): + """ + The type of user. + """ + USER = "User" + GROUP = "Group" diff --git a/sdk/python/pulumi_azure_native/authorization/v20201001preview/_inputs.py b/sdk/python/pulumi_azure_native/authorization/v20201001preview/_inputs.py new file mode 100644 index 000000000000..6f87110dad79 --- /dev/null +++ b/sdk/python/pulumi_azure_native/authorization/v20201001preview/_inputs.py @@ -0,0 +1,853 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumi-language-python. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from ... import _utilities +from ._enums import * + +__all__ = [ + 'ApprovalSettingsArgs', + 'ApprovalStageArgs', + 'RoleManagementPolicyApprovalRuleArgs', + 'RoleManagementPolicyAuthenticationContextRuleArgs', + 'RoleManagementPolicyEnablementRuleArgs', + 'RoleManagementPolicyExpirationRuleArgs', + 'RoleManagementPolicyNotificationRuleArgs', + 'RoleManagementPolicyRuleTargetArgs', + 'UserSetArgs', +] + +@pulumi.input_type +class ApprovalSettingsArgs: + def __init__(__self__, *, + approval_mode: Optional[pulumi.Input[Union[str, 'ApprovalMode']]] = None, + approval_stages: Optional[pulumi.Input[Sequence[pulumi.Input['ApprovalStageArgs']]]] = None, + is_approval_required: Optional[pulumi.Input[bool]] = None, + is_approval_required_for_extension: Optional[pulumi.Input[bool]] = None, + is_requestor_justification_required: Optional[pulumi.Input[bool]] = None): + """ + The approval settings. + :param pulumi.Input[Union[str, 'ApprovalMode']] approval_mode: The type of rule + :param pulumi.Input[Sequence[pulumi.Input['ApprovalStageArgs']]] approval_stages: The approval stages of the request. + :param pulumi.Input[bool] is_approval_required: Determines whether approval is required or not. + :param pulumi.Input[bool] is_approval_required_for_extension: Determines whether approval is required for assignment extension. + :param pulumi.Input[bool] is_requestor_justification_required: Determine whether requestor justification is required. + """ + if approval_mode is not None: + pulumi.set(__self__, "approval_mode", approval_mode) + if approval_stages is not None: + pulumi.set(__self__, "approval_stages", approval_stages) + if is_approval_required is not None: + pulumi.set(__self__, "is_approval_required", is_approval_required) + if is_approval_required_for_extension is not None: + pulumi.set(__self__, "is_approval_required_for_extension", is_approval_required_for_extension) + if is_requestor_justification_required is not None: + pulumi.set(__self__, "is_requestor_justification_required", is_requestor_justification_required) + + @property + @pulumi.getter(name="approvalMode") + def approval_mode(self) -> Optional[pulumi.Input[Union[str, 'ApprovalMode']]]: + """ + The type of rule + """ + return pulumi.get(self, "approval_mode") + + @approval_mode.setter + def approval_mode(self, value: Optional[pulumi.Input[Union[str, 'ApprovalMode']]]): + pulumi.set(self, "approval_mode", value) + + @property + @pulumi.getter(name="approvalStages") + def approval_stages(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ApprovalStageArgs']]]]: + """ + The approval stages of the request. + """ + return pulumi.get(self, "approval_stages") + + @approval_stages.setter + def approval_stages(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ApprovalStageArgs']]]]): + pulumi.set(self, "approval_stages", value) + + @property + @pulumi.getter(name="isApprovalRequired") + def is_approval_required(self) -> Optional[pulumi.Input[bool]]: + """ + Determines whether approval is required or not. + """ + return pulumi.get(self, "is_approval_required") + + @is_approval_required.setter + def is_approval_required(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_approval_required", value) + + @property + @pulumi.getter(name="isApprovalRequiredForExtension") + def is_approval_required_for_extension(self) -> Optional[pulumi.Input[bool]]: + """ + Determines whether approval is required for assignment extension. + """ + return pulumi.get(self, "is_approval_required_for_extension") + + @is_approval_required_for_extension.setter + def is_approval_required_for_extension(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_approval_required_for_extension", value) + + @property + @pulumi.getter(name="isRequestorJustificationRequired") + def is_requestor_justification_required(self) -> Optional[pulumi.Input[bool]]: + """ + Determine whether requestor justification is required. + """ + return pulumi.get(self, "is_requestor_justification_required") + + @is_requestor_justification_required.setter + def is_requestor_justification_required(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_requestor_justification_required", value) + + +@pulumi.input_type +class ApprovalStageArgs: + def __init__(__self__, *, + approval_stage_time_out_in_days: Optional[pulumi.Input[int]] = None, + escalation_approvers: Optional[pulumi.Input[Sequence[pulumi.Input['UserSetArgs']]]] = None, + escalation_time_in_minutes: Optional[pulumi.Input[int]] = None, + is_approver_justification_required: Optional[pulumi.Input[bool]] = None, + is_escalation_enabled: Optional[pulumi.Input[bool]] = None, + primary_approvers: Optional[pulumi.Input[Sequence[pulumi.Input['UserSetArgs']]]] = None): + """ + The approval stage. + :param pulumi.Input[int] approval_stage_time_out_in_days: The time in days when approval request would be timed out + :param pulumi.Input[Sequence[pulumi.Input['UserSetArgs']]] escalation_approvers: The escalation approver of the request. + :param pulumi.Input[int] escalation_time_in_minutes: The time in minutes when the approval request would be escalated if the primary approver does not approve + :param pulumi.Input[bool] is_approver_justification_required: Determines whether approver need to provide justification for his decision. + :param pulumi.Input[bool] is_escalation_enabled: The value determine whether escalation feature is enabled. + :param pulumi.Input[Sequence[pulumi.Input['UserSetArgs']]] primary_approvers: The primary approver of the request. + """ + if approval_stage_time_out_in_days is not None: + pulumi.set(__self__, "approval_stage_time_out_in_days", approval_stage_time_out_in_days) + if escalation_approvers is not None: + pulumi.set(__self__, "escalation_approvers", escalation_approvers) + if escalation_time_in_minutes is not None: + pulumi.set(__self__, "escalation_time_in_minutes", escalation_time_in_minutes) + if is_approver_justification_required is not None: + pulumi.set(__self__, "is_approver_justification_required", is_approver_justification_required) + if is_escalation_enabled is not None: + pulumi.set(__self__, "is_escalation_enabled", is_escalation_enabled) + if primary_approvers is not None: + pulumi.set(__self__, "primary_approvers", primary_approvers) + + @property + @pulumi.getter(name="approvalStageTimeOutInDays") + def approval_stage_time_out_in_days(self) -> Optional[pulumi.Input[int]]: + """ + The time in days when approval request would be timed out + """ + return pulumi.get(self, "approval_stage_time_out_in_days") + + @approval_stage_time_out_in_days.setter + def approval_stage_time_out_in_days(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "approval_stage_time_out_in_days", value) + + @property + @pulumi.getter(name="escalationApprovers") + def escalation_approvers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['UserSetArgs']]]]: + """ + The escalation approver of the request. + """ + return pulumi.get(self, "escalation_approvers") + + @escalation_approvers.setter + def escalation_approvers(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['UserSetArgs']]]]): + pulumi.set(self, "escalation_approvers", value) + + @property + @pulumi.getter(name="escalationTimeInMinutes") + def escalation_time_in_minutes(self) -> Optional[pulumi.Input[int]]: + """ + The time in minutes when the approval request would be escalated if the primary approver does not approve + """ + return pulumi.get(self, "escalation_time_in_minutes") + + @escalation_time_in_minutes.setter + def escalation_time_in_minutes(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "escalation_time_in_minutes", value) + + @property + @pulumi.getter(name="isApproverJustificationRequired") + def is_approver_justification_required(self) -> Optional[pulumi.Input[bool]]: + """ + Determines whether approver need to provide justification for his decision. + """ + return pulumi.get(self, "is_approver_justification_required") + + @is_approver_justification_required.setter + def is_approver_justification_required(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_approver_justification_required", value) + + @property + @pulumi.getter(name="isEscalationEnabled") + def is_escalation_enabled(self) -> Optional[pulumi.Input[bool]]: + """ + The value determine whether escalation feature is enabled. + """ + return pulumi.get(self, "is_escalation_enabled") + + @is_escalation_enabled.setter + def is_escalation_enabled(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_escalation_enabled", value) + + @property + @pulumi.getter(name="primaryApprovers") + def primary_approvers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['UserSetArgs']]]]: + """ + The primary approver of the request. + """ + return pulumi.get(self, "primary_approvers") + + @primary_approvers.setter + def primary_approvers(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['UserSetArgs']]]]): + pulumi.set(self, "primary_approvers", value) + + +@pulumi.input_type +class RoleManagementPolicyApprovalRuleArgs: + def __init__(__self__, *, + rule_type: pulumi.Input[str], + id: Optional[pulumi.Input[str]] = None, + setting: Optional[pulumi.Input['ApprovalSettingsArgs']] = None, + target: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']] = None): + """ + The role management policy approval rule. + :param pulumi.Input[str] rule_type: The type of rule + Expected value is 'RoleManagementPolicyApprovalRule'. + :param pulumi.Input[str] id: The id of the rule. + :param pulumi.Input['ApprovalSettingsArgs'] setting: The approval setting + :param pulumi.Input['RoleManagementPolicyRuleTargetArgs'] target: The target of the current rule. + """ + pulumi.set(__self__, "rule_type", 'RoleManagementPolicyApprovalRule') + if id is not None: + pulumi.set(__self__, "id", id) + if setting is not None: + pulumi.set(__self__, "setting", setting) + if target is not None: + pulumi.set(__self__, "target", target) + + @property + @pulumi.getter(name="ruleType") + def rule_type(self) -> pulumi.Input[str]: + """ + The type of rule + Expected value is 'RoleManagementPolicyApprovalRule'. + """ + return pulumi.get(self, "rule_type") + + @rule_type.setter + def rule_type(self, value: pulumi.Input[str]): + pulumi.set(self, "rule_type", value) + + @property + @pulumi.getter + def id(self) -> Optional[pulumi.Input[str]]: + """ + The id of the rule. + """ + return pulumi.get(self, "id") + + @id.setter + def id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "id", value) + + @property + @pulumi.getter + def setting(self) -> Optional[pulumi.Input['ApprovalSettingsArgs']]: + """ + The approval setting + """ + return pulumi.get(self, "setting") + + @setting.setter + def setting(self, value: Optional[pulumi.Input['ApprovalSettingsArgs']]): + pulumi.set(self, "setting", value) + + @property + @pulumi.getter + def target(self) -> Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]: + """ + The target of the current rule. + """ + return pulumi.get(self, "target") + + @target.setter + def target(self, value: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]): + pulumi.set(self, "target", value) + + +@pulumi.input_type +class RoleManagementPolicyAuthenticationContextRuleArgs: + def __init__(__self__, *, + rule_type: pulumi.Input[str], + claim_value: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + is_enabled: Optional[pulumi.Input[bool]] = None, + target: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']] = None): + """ + The role management policy authentication context rule. + :param pulumi.Input[str] rule_type: The type of rule + Expected value is 'RoleManagementPolicyAuthenticationContextRule'. + :param pulumi.Input[str] claim_value: The claim value. + :param pulumi.Input[str] id: The id of the rule. + :param pulumi.Input[bool] is_enabled: The value indicating if rule is enabled. + :param pulumi.Input['RoleManagementPolicyRuleTargetArgs'] target: The target of the current rule. + """ + pulumi.set(__self__, "rule_type", 'RoleManagementPolicyAuthenticationContextRule') + if claim_value is not None: + pulumi.set(__self__, "claim_value", claim_value) + if id is not None: + pulumi.set(__self__, "id", id) + if is_enabled is not None: + pulumi.set(__self__, "is_enabled", is_enabled) + if target is not None: + pulumi.set(__self__, "target", target) + + @property + @pulumi.getter(name="ruleType") + def rule_type(self) -> pulumi.Input[str]: + """ + The type of rule + Expected value is 'RoleManagementPolicyAuthenticationContextRule'. + """ + return pulumi.get(self, "rule_type") + + @rule_type.setter + def rule_type(self, value: pulumi.Input[str]): + pulumi.set(self, "rule_type", value) + + @property + @pulumi.getter(name="claimValue") + def claim_value(self) -> Optional[pulumi.Input[str]]: + """ + The claim value. + """ + return pulumi.get(self, "claim_value") + + @claim_value.setter + def claim_value(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "claim_value", value) + + @property + @pulumi.getter + def id(self) -> Optional[pulumi.Input[str]]: + """ + The id of the rule. + """ + return pulumi.get(self, "id") + + @id.setter + def id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "id", value) + + @property + @pulumi.getter(name="isEnabled") + def is_enabled(self) -> Optional[pulumi.Input[bool]]: + """ + The value indicating if rule is enabled. + """ + return pulumi.get(self, "is_enabled") + + @is_enabled.setter + def is_enabled(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_enabled", value) + + @property + @pulumi.getter + def target(self) -> Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]: + """ + The target of the current rule. + """ + return pulumi.get(self, "target") + + @target.setter + def target(self, value: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]): + pulumi.set(self, "target", value) + + +@pulumi.input_type +class RoleManagementPolicyEnablementRuleArgs: + def __init__(__self__, *, + rule_type: pulumi.Input[str], + enabled_rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union[str, 'EnablementRules']]]]] = None, + id: Optional[pulumi.Input[str]] = None, + target: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']] = None): + """ + The role management policy rule. + :param pulumi.Input[str] rule_type: The type of rule + Expected value is 'RoleManagementPolicyEnablementRule'. + :param pulumi.Input[Sequence[pulumi.Input[Union[str, 'EnablementRules']]]] enabled_rules: The list of enabled rules. + :param pulumi.Input[str] id: The id of the rule. + :param pulumi.Input['RoleManagementPolicyRuleTargetArgs'] target: The target of the current rule. + """ + pulumi.set(__self__, "rule_type", 'RoleManagementPolicyEnablementRule') + if enabled_rules is not None: + pulumi.set(__self__, "enabled_rules", enabled_rules) + if id is not None: + pulumi.set(__self__, "id", id) + if target is not None: + pulumi.set(__self__, "target", target) + + @property + @pulumi.getter(name="ruleType") + def rule_type(self) -> pulumi.Input[str]: + """ + The type of rule + Expected value is 'RoleManagementPolicyEnablementRule'. + """ + return pulumi.get(self, "rule_type") + + @rule_type.setter + def rule_type(self, value: pulumi.Input[str]): + pulumi.set(self, "rule_type", value) + + @property + @pulumi.getter(name="enabledRules") + def enabled_rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[Union[str, 'EnablementRules']]]]]: + """ + The list of enabled rules. + """ + return pulumi.get(self, "enabled_rules") + + @enabled_rules.setter + def enabled_rules(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[Union[str, 'EnablementRules']]]]]): + pulumi.set(self, "enabled_rules", value) + + @property + @pulumi.getter + def id(self) -> Optional[pulumi.Input[str]]: + """ + The id of the rule. + """ + return pulumi.get(self, "id") + + @id.setter + def id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "id", value) + + @property + @pulumi.getter + def target(self) -> Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]: + """ + The target of the current rule. + """ + return pulumi.get(self, "target") + + @target.setter + def target(self, value: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]): + pulumi.set(self, "target", value) + + +@pulumi.input_type +class RoleManagementPolicyExpirationRuleArgs: + def __init__(__self__, *, + rule_type: pulumi.Input[str], + id: Optional[pulumi.Input[str]] = None, + is_expiration_required: Optional[pulumi.Input[bool]] = None, + maximum_duration: Optional[pulumi.Input[str]] = None, + target: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']] = None): + """ + The role management policy expiration rule. + :param pulumi.Input[str] rule_type: The type of rule + Expected value is 'RoleManagementPolicyExpirationRule'. + :param pulumi.Input[str] id: The id of the rule. + :param pulumi.Input[bool] is_expiration_required: The value indicating whether expiration is required. + :param pulumi.Input[str] maximum_duration: The maximum duration of expiration in timespan. + :param pulumi.Input['RoleManagementPolicyRuleTargetArgs'] target: The target of the current rule. + """ + pulumi.set(__self__, "rule_type", 'RoleManagementPolicyExpirationRule') + if id is not None: + pulumi.set(__self__, "id", id) + if is_expiration_required is not None: + pulumi.set(__self__, "is_expiration_required", is_expiration_required) + if maximum_duration is not None: + pulumi.set(__self__, "maximum_duration", maximum_duration) + if target is not None: + pulumi.set(__self__, "target", target) + + @property + @pulumi.getter(name="ruleType") + def rule_type(self) -> pulumi.Input[str]: + """ + The type of rule + Expected value is 'RoleManagementPolicyExpirationRule'. + """ + return pulumi.get(self, "rule_type") + + @rule_type.setter + def rule_type(self, value: pulumi.Input[str]): + pulumi.set(self, "rule_type", value) + + @property + @pulumi.getter + def id(self) -> Optional[pulumi.Input[str]]: + """ + The id of the rule. + """ + return pulumi.get(self, "id") + + @id.setter + def id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "id", value) + + @property + @pulumi.getter(name="isExpirationRequired") + def is_expiration_required(self) -> Optional[pulumi.Input[bool]]: + """ + The value indicating whether expiration is required. + """ + return pulumi.get(self, "is_expiration_required") + + @is_expiration_required.setter + def is_expiration_required(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_expiration_required", value) + + @property + @pulumi.getter(name="maximumDuration") + def maximum_duration(self) -> Optional[pulumi.Input[str]]: + """ + The maximum duration of expiration in timespan. + """ + return pulumi.get(self, "maximum_duration") + + @maximum_duration.setter + def maximum_duration(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "maximum_duration", value) + + @property + @pulumi.getter + def target(self) -> Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]: + """ + The target of the current rule. + """ + return pulumi.get(self, "target") + + @target.setter + def target(self, value: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]): + pulumi.set(self, "target", value) + + +@pulumi.input_type +class RoleManagementPolicyNotificationRuleArgs: + def __init__(__self__, *, + rule_type: pulumi.Input[str], + id: Optional[pulumi.Input[str]] = None, + is_default_recipients_enabled: Optional[pulumi.Input[bool]] = None, + notification_level: Optional[pulumi.Input[Union[str, 'NotificationLevel']]] = None, + notification_recipients: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + notification_type: Optional[pulumi.Input[Union[str, 'NotificationDeliveryMechanism']]] = None, + recipient_type: Optional[pulumi.Input[Union[str, 'RecipientType']]] = None, + target: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']] = None): + """ + The role management policy notification rule. + :param pulumi.Input[str] rule_type: The type of rule + Expected value is 'RoleManagementPolicyNotificationRule'. + :param pulumi.Input[str] id: The id of the rule. + :param pulumi.Input[bool] is_default_recipients_enabled: Determines if the notification will be sent to the recipient type specified in the policy rule. + :param pulumi.Input[Union[str, 'NotificationLevel']] notification_level: The notification level. + :param pulumi.Input[Sequence[pulumi.Input[str]]] notification_recipients: The list of notification recipients. + :param pulumi.Input[Union[str, 'NotificationDeliveryMechanism']] notification_type: The type of notification. + :param pulumi.Input[Union[str, 'RecipientType']] recipient_type: The recipient type. + :param pulumi.Input['RoleManagementPolicyRuleTargetArgs'] target: The target of the current rule. + """ + pulumi.set(__self__, "rule_type", 'RoleManagementPolicyNotificationRule') + if id is not None: + pulumi.set(__self__, "id", id) + if is_default_recipients_enabled is not None: + pulumi.set(__self__, "is_default_recipients_enabled", is_default_recipients_enabled) + if notification_level is not None: + pulumi.set(__self__, "notification_level", notification_level) + if notification_recipients is not None: + pulumi.set(__self__, "notification_recipients", notification_recipients) + if notification_type is not None: + pulumi.set(__self__, "notification_type", notification_type) + if recipient_type is not None: + pulumi.set(__self__, "recipient_type", recipient_type) + if target is not None: + pulumi.set(__self__, "target", target) + + @property + @pulumi.getter(name="ruleType") + def rule_type(self) -> pulumi.Input[str]: + """ + The type of rule + Expected value is 'RoleManagementPolicyNotificationRule'. + """ + return pulumi.get(self, "rule_type") + + @rule_type.setter + def rule_type(self, value: pulumi.Input[str]): + pulumi.set(self, "rule_type", value) + + @property + @pulumi.getter + def id(self) -> Optional[pulumi.Input[str]]: + """ + The id of the rule. + """ + return pulumi.get(self, "id") + + @id.setter + def id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "id", value) + + @property + @pulumi.getter(name="isDefaultRecipientsEnabled") + def is_default_recipients_enabled(self) -> Optional[pulumi.Input[bool]]: + """ + Determines if the notification will be sent to the recipient type specified in the policy rule. + """ + return pulumi.get(self, "is_default_recipients_enabled") + + @is_default_recipients_enabled.setter + def is_default_recipients_enabled(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_default_recipients_enabled", value) + + @property + @pulumi.getter(name="notificationLevel") + def notification_level(self) -> Optional[pulumi.Input[Union[str, 'NotificationLevel']]]: + """ + The notification level. + """ + return pulumi.get(self, "notification_level") + + @notification_level.setter + def notification_level(self, value: Optional[pulumi.Input[Union[str, 'NotificationLevel']]]): + pulumi.set(self, "notification_level", value) + + @property + @pulumi.getter(name="notificationRecipients") + def notification_recipients(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + The list of notification recipients. + """ + return pulumi.get(self, "notification_recipients") + + @notification_recipients.setter + def notification_recipients(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "notification_recipients", value) + + @property + @pulumi.getter(name="notificationType") + def notification_type(self) -> Optional[pulumi.Input[Union[str, 'NotificationDeliveryMechanism']]]: + """ + The type of notification. + """ + return pulumi.get(self, "notification_type") + + @notification_type.setter + def notification_type(self, value: Optional[pulumi.Input[Union[str, 'NotificationDeliveryMechanism']]]): + pulumi.set(self, "notification_type", value) + + @property + @pulumi.getter(name="recipientType") + def recipient_type(self) -> Optional[pulumi.Input[Union[str, 'RecipientType']]]: + """ + The recipient type. + """ + return pulumi.get(self, "recipient_type") + + @recipient_type.setter + def recipient_type(self, value: Optional[pulumi.Input[Union[str, 'RecipientType']]]): + pulumi.set(self, "recipient_type", value) + + @property + @pulumi.getter + def target(self) -> Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]: + """ + The target of the current rule. + """ + return pulumi.get(self, "target") + + @target.setter + def target(self, value: Optional[pulumi.Input['RoleManagementPolicyRuleTargetArgs']]): + pulumi.set(self, "target", value) + + +@pulumi.input_type +class RoleManagementPolicyRuleTargetArgs: + def __init__(__self__, *, + caller: Optional[pulumi.Input[str]] = None, + enforced_settings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + inheritable_settings: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + level: Optional[pulumi.Input[str]] = None, + operations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + target_objects: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None): + """ + The role management policy rule target. + :param pulumi.Input[str] caller: The caller of the setting. + :param pulumi.Input[Sequence[pulumi.Input[str]]] enforced_settings: The list of enforced settings. + :param pulumi.Input[Sequence[pulumi.Input[str]]] inheritable_settings: The list of inheritable settings. + :param pulumi.Input[str] level: The assignment level to which rule is applied. + :param pulumi.Input[Sequence[pulumi.Input[str]]] operations: The type of operation. + :param pulumi.Input[Sequence[pulumi.Input[str]]] target_objects: The list of target objects. + """ + if caller is not None: + pulumi.set(__self__, "caller", caller) + if enforced_settings is not None: + pulumi.set(__self__, "enforced_settings", enforced_settings) + if inheritable_settings is not None: + pulumi.set(__self__, "inheritable_settings", inheritable_settings) + if level is not None: + pulumi.set(__self__, "level", level) + if operations is not None: + pulumi.set(__self__, "operations", operations) + if target_objects is not None: + pulumi.set(__self__, "target_objects", target_objects) + + @property + @pulumi.getter + def caller(self) -> Optional[pulumi.Input[str]]: + """ + The caller of the setting. + """ + return pulumi.get(self, "caller") + + @caller.setter + def caller(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "caller", value) + + @property + @pulumi.getter(name="enforcedSettings") + def enforced_settings(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + The list of enforced settings. + """ + return pulumi.get(self, "enforced_settings") + + @enforced_settings.setter + def enforced_settings(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "enforced_settings", value) + + @property + @pulumi.getter(name="inheritableSettings") + def inheritable_settings(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + The list of inheritable settings. + """ + return pulumi.get(self, "inheritable_settings") + + @inheritable_settings.setter + def inheritable_settings(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "inheritable_settings", value) + + @property + @pulumi.getter + def level(self) -> Optional[pulumi.Input[str]]: + """ + The assignment level to which rule is applied. + """ + return pulumi.get(self, "level") + + @level.setter + def level(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "level", value) + + @property + @pulumi.getter + def operations(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + The type of operation. + """ + return pulumi.get(self, "operations") + + @operations.setter + def operations(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "operations", value) + + @property + @pulumi.getter(name="targetObjects") + def target_objects(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + The list of target objects. + """ + return pulumi.get(self, "target_objects") + + @target_objects.setter + def target_objects(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "target_objects", value) + + +@pulumi.input_type +class UserSetArgs: + def __init__(__self__, *, + description: Optional[pulumi.Input[str]] = None, + id: Optional[pulumi.Input[str]] = None, + is_backup: Optional[pulumi.Input[bool]] = None, + user_type: Optional[pulumi.Input[Union[str, 'UserType']]] = None): + """ + The detail of a user. + :param pulumi.Input[str] description: The description of the user. + :param pulumi.Input[str] id: The object id of the user. + :param pulumi.Input[bool] is_backup: The value indicating whether the user is a backup fallback approver + :param pulumi.Input[Union[str, 'UserType']] user_type: The type of user. + """ + if description is not None: + pulumi.set(__self__, "description", description) + if id is not None: + pulumi.set(__self__, "id", id) + if is_backup is not None: + pulumi.set(__self__, "is_backup", is_backup) + if user_type is not None: + pulumi.set(__self__, "user_type", user_type) + + @property + @pulumi.getter + def description(self) -> Optional[pulumi.Input[str]]: + """ + The description of the user. + """ + return pulumi.get(self, "description") + + @description.setter + def description(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "description", value) + + @property + @pulumi.getter + def id(self) -> Optional[pulumi.Input[str]]: + """ + The object id of the user. + """ + return pulumi.get(self, "id") + + @id.setter + def id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "id", value) + + @property + @pulumi.getter(name="isBackup") + def is_backup(self) -> Optional[pulumi.Input[bool]]: + """ + The value indicating whether the user is a backup fallback approver + """ + return pulumi.get(self, "is_backup") + + @is_backup.setter + def is_backup(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_backup", value) + + @property + @pulumi.getter(name="userType") + def user_type(self) -> Optional[pulumi.Input[Union[str, 'UserType']]]: + """ + The type of user. + """ + return pulumi.get(self, "user_type") + + @user_type.setter + def user_type(self, value: Optional[pulumi.Input[Union[str, 'UserType']]]): + pulumi.set(self, "user_type", value) + + diff --git a/sdk/python/pulumi_azure_native/authorization/v20201001preview/get_role_management_policy.py b/sdk/python/pulumi_azure_native/authorization/v20201001preview/get_role_management_policy.py new file mode 100644 index 000000000000..138c108855f4 --- /dev/null +++ b/sdk/python/pulumi_azure_native/authorization/v20201001preview/get_role_management_policy.py @@ -0,0 +1,222 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumi-language-python. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from ... import _utilities +from . import outputs + +__all__ = [ + 'GetRoleManagementPolicyResult', + 'AwaitableGetRoleManagementPolicyResult', + 'get_role_management_policy', + 'get_role_management_policy_output', +] + +@pulumi.output_type +class GetRoleManagementPolicyResult: + """ + Role management policy + """ + def __init__(__self__, description=None, display_name=None, effective_rules=None, id=None, is_organization_default=None, last_modified_by=None, last_modified_date_time=None, name=None, policy_properties=None, rules=None, scope=None, type=None): + if description and not isinstance(description, str): + raise TypeError("Expected argument 'description' to be a str") + pulumi.set(__self__, "description", description) + if display_name and not isinstance(display_name, str): + raise TypeError("Expected argument 'display_name' to be a str") + pulumi.set(__self__, "display_name", display_name) + if effective_rules and not isinstance(effective_rules, list): + raise TypeError("Expected argument 'effective_rules' to be a list") + pulumi.set(__self__, "effective_rules", effective_rules) + if id and not isinstance(id, str): + raise TypeError("Expected argument 'id' to be a str") + pulumi.set(__self__, "id", id) + if is_organization_default and not isinstance(is_organization_default, bool): + raise TypeError("Expected argument 'is_organization_default' to be a bool") + pulumi.set(__self__, "is_organization_default", is_organization_default) + if last_modified_by and not isinstance(last_modified_by, dict): + raise TypeError("Expected argument 'last_modified_by' to be a dict") + pulumi.set(__self__, "last_modified_by", last_modified_by) + if last_modified_date_time and not isinstance(last_modified_date_time, str): + raise TypeError("Expected argument 'last_modified_date_time' to be a str") + pulumi.set(__self__, "last_modified_date_time", last_modified_date_time) + if name and not isinstance(name, str): + raise TypeError("Expected argument 'name' to be a str") + pulumi.set(__self__, "name", name) + if policy_properties and not isinstance(policy_properties, dict): + raise TypeError("Expected argument 'policy_properties' to be a dict") + pulumi.set(__self__, "policy_properties", policy_properties) + if rules and not isinstance(rules, list): + raise TypeError("Expected argument 'rules' to be a list") + pulumi.set(__self__, "rules", rules) + if scope and not isinstance(scope, str): + raise TypeError("Expected argument 'scope' to be a str") + pulumi.set(__self__, "scope", scope) + if type and not isinstance(type, str): + raise TypeError("Expected argument 'type' to be a str") + pulumi.set(__self__, "type", type) + + @property + @pulumi.getter + def description(self) -> Optional[str]: + """ + The role management policy description. + """ + return pulumi.get(self, "description") + + @property + @pulumi.getter(name="displayName") + def display_name(self) -> Optional[str]: + """ + The role management policy display name. + """ + return pulumi.get(self, "display_name") + + @property + @pulumi.getter(name="effectiveRules") + def effective_rules(self) -> Sequence[Any]: + """ + The readonly computed rule applied to the policy. + """ + return pulumi.get(self, "effective_rules") + + @property + @pulumi.getter + def id(self) -> str: + """ + The role management policy Id. + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter(name="isOrganizationDefault") + def is_organization_default(self) -> Optional[bool]: + """ + The role management policy is default policy. + """ + return pulumi.get(self, "is_organization_default") + + @property + @pulumi.getter(name="lastModifiedBy") + def last_modified_by(self) -> 'outputs.PrincipalResponse': + """ + The name of the entity last modified it + """ + return pulumi.get(self, "last_modified_by") + + @property + @pulumi.getter(name="lastModifiedDateTime") + def last_modified_date_time(self) -> str: + """ + The last modified date time. + """ + return pulumi.get(self, "last_modified_date_time") + + @property + @pulumi.getter + def name(self) -> str: + """ + The role management policy name. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter(name="policyProperties") + def policy_properties(self) -> 'outputs.PolicyPropertiesResponse': + """ + Additional properties of scope + """ + return pulumi.get(self, "policy_properties") + + @property + @pulumi.getter + def rules(self) -> Optional[Sequence[Any]]: + """ + The rule applied to the policy. + """ + return pulumi.get(self, "rules") + + @property + @pulumi.getter + def scope(self) -> Optional[str]: + """ + The role management policy scope. + """ + return pulumi.get(self, "scope") + + @property + @pulumi.getter + def type(self) -> str: + """ + The role management policy type. + """ + return pulumi.get(self, "type") + + +class AwaitableGetRoleManagementPolicyResult(GetRoleManagementPolicyResult): + # pylint: disable=using-constant-test + def __await__(self): + if False: + yield self + return GetRoleManagementPolicyResult( + description=self.description, + display_name=self.display_name, + effective_rules=self.effective_rules, + id=self.id, + is_organization_default=self.is_organization_default, + last_modified_by=self.last_modified_by, + last_modified_date_time=self.last_modified_date_time, + name=self.name, + policy_properties=self.policy_properties, + rules=self.rules, + scope=self.scope, + type=self.type) + + +def get_role_management_policy(role_management_policy_name: Optional[str] = None, + scope: Optional[str] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetRoleManagementPolicyResult: + """ + Get the specified role management policy for a resource scope + + + :param str role_management_policy_name: The name (guid) of the role management policy to get. + :param str scope: The scope of the role management policy. + """ + __args__ = dict() + __args__['roleManagementPolicyName'] = role_management_policy_name + __args__['scope'] = scope + opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + __ret__ = pulumi.runtime.invoke('azure-native:authorization/v20201001preview:getRoleManagementPolicy', __args__, opts=opts, typ=GetRoleManagementPolicyResult).value + + return AwaitableGetRoleManagementPolicyResult( + description=pulumi.get(__ret__, 'description'), + display_name=pulumi.get(__ret__, 'display_name'), + effective_rules=pulumi.get(__ret__, 'effective_rules'), + id=pulumi.get(__ret__, 'id'), + is_organization_default=pulumi.get(__ret__, 'is_organization_default'), + last_modified_by=pulumi.get(__ret__, 'last_modified_by'), + last_modified_date_time=pulumi.get(__ret__, 'last_modified_date_time'), + name=pulumi.get(__ret__, 'name'), + policy_properties=pulumi.get(__ret__, 'policy_properties'), + rules=pulumi.get(__ret__, 'rules'), + scope=pulumi.get(__ret__, 'scope'), + type=pulumi.get(__ret__, 'type')) + + +@_utilities.lift_output_func(get_role_management_policy) +def get_role_management_policy_output(role_management_policy_name: Optional[pulumi.Input[str]] = None, + scope: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetRoleManagementPolicyResult]: + """ + Get the specified role management policy for a resource scope + + + :param str role_management_policy_name: The name (guid) of the role management policy to get. + :param str scope: The scope of the role management policy. + """ + ... diff --git a/sdk/python/pulumi_azure_native/authorization/v20201001preview/outputs.py b/sdk/python/pulumi_azure_native/authorization/v20201001preview/outputs.py index bb2a6910ae87..f67deca609a4 100644 --- a/sdk/python/pulumi_azure_native/authorization/v20201001preview/outputs.py +++ b/sdk/python/pulumi_azure_native/authorization/v20201001preview/outputs.py @@ -9,15 +9,233 @@ from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs +from ._enums import * __all__ = [ + 'ApprovalSettingsResponse', + 'ApprovalStageResponse', 'PolicyAssignmentPropertiesResponse', 'PolicyAssignmentPropertiesResponsePolicy', 'PolicyAssignmentPropertiesResponseRoleDefinition', 'PolicyAssignmentPropertiesResponseScope', + 'PolicyPropertiesResponse', + 'PolicyPropertiesResponseScope', 'PrincipalResponse', + 'RoleManagementPolicyApprovalRuleResponse', + 'RoleManagementPolicyAuthenticationContextRuleResponse', + 'RoleManagementPolicyEnablementRuleResponse', + 'RoleManagementPolicyExpirationRuleResponse', + 'RoleManagementPolicyNotificationRuleResponse', + 'RoleManagementPolicyRuleTargetResponse', + 'UserSetResponse', ] +@pulumi.output_type +class ApprovalSettingsResponse(dict): + """ + The approval settings. + """ + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "approvalMode": + suggest = "approval_mode" + elif key == "approvalStages": + suggest = "approval_stages" + elif key == "isApprovalRequired": + suggest = "is_approval_required" + elif key == "isApprovalRequiredForExtension": + suggest = "is_approval_required_for_extension" + elif key == "isRequestorJustificationRequired": + suggest = "is_requestor_justification_required" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in ApprovalSettingsResponse. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + ApprovalSettingsResponse.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + ApprovalSettingsResponse.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + approval_mode: Optional[str] = None, + approval_stages: Optional[Sequence['outputs.ApprovalStageResponse']] = None, + is_approval_required: Optional[bool] = None, + is_approval_required_for_extension: Optional[bool] = None, + is_requestor_justification_required: Optional[bool] = None): + """ + The approval settings. + :param str approval_mode: The type of rule + :param Sequence['ApprovalStageResponse'] approval_stages: The approval stages of the request. + :param bool is_approval_required: Determines whether approval is required or not. + :param bool is_approval_required_for_extension: Determines whether approval is required for assignment extension. + :param bool is_requestor_justification_required: Determine whether requestor justification is required. + """ + if approval_mode is not None: + pulumi.set(__self__, "approval_mode", approval_mode) + if approval_stages is not None: + pulumi.set(__self__, "approval_stages", approval_stages) + if is_approval_required is not None: + pulumi.set(__self__, "is_approval_required", is_approval_required) + if is_approval_required_for_extension is not None: + pulumi.set(__self__, "is_approval_required_for_extension", is_approval_required_for_extension) + if is_requestor_justification_required is not None: + pulumi.set(__self__, "is_requestor_justification_required", is_requestor_justification_required) + + @property + @pulumi.getter(name="approvalMode") + def approval_mode(self) -> Optional[str]: + """ + The type of rule + """ + return pulumi.get(self, "approval_mode") + + @property + @pulumi.getter(name="approvalStages") + def approval_stages(self) -> Optional[Sequence['outputs.ApprovalStageResponse']]: + """ + The approval stages of the request. + """ + return pulumi.get(self, "approval_stages") + + @property + @pulumi.getter(name="isApprovalRequired") + def is_approval_required(self) -> Optional[bool]: + """ + Determines whether approval is required or not. + """ + return pulumi.get(self, "is_approval_required") + + @property + @pulumi.getter(name="isApprovalRequiredForExtension") + def is_approval_required_for_extension(self) -> Optional[bool]: + """ + Determines whether approval is required for assignment extension. + """ + return pulumi.get(self, "is_approval_required_for_extension") + + @property + @pulumi.getter(name="isRequestorJustificationRequired") + def is_requestor_justification_required(self) -> Optional[bool]: + """ + Determine whether requestor justification is required. + """ + return pulumi.get(self, "is_requestor_justification_required") + + +@pulumi.output_type +class ApprovalStageResponse(dict): + """ + The approval stage. + """ + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "approvalStageTimeOutInDays": + suggest = "approval_stage_time_out_in_days" + elif key == "escalationApprovers": + suggest = "escalation_approvers" + elif key == "escalationTimeInMinutes": + suggest = "escalation_time_in_minutes" + elif key == "isApproverJustificationRequired": + suggest = "is_approver_justification_required" + elif key == "isEscalationEnabled": + suggest = "is_escalation_enabled" + elif key == "primaryApprovers": + suggest = "primary_approvers" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in ApprovalStageResponse. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + ApprovalStageResponse.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + ApprovalStageResponse.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + approval_stage_time_out_in_days: Optional[int] = None, + escalation_approvers: Optional[Sequence['outputs.UserSetResponse']] = None, + escalation_time_in_minutes: Optional[int] = None, + is_approver_justification_required: Optional[bool] = None, + is_escalation_enabled: Optional[bool] = None, + primary_approvers: Optional[Sequence['outputs.UserSetResponse']] = None): + """ + The approval stage. + :param int approval_stage_time_out_in_days: The time in days when approval request would be timed out + :param Sequence['UserSetResponse'] escalation_approvers: The escalation approver of the request. + :param int escalation_time_in_minutes: The time in minutes when the approval request would be escalated if the primary approver does not approve + :param bool is_approver_justification_required: Determines whether approver need to provide justification for his decision. + :param bool is_escalation_enabled: The value determine whether escalation feature is enabled. + :param Sequence['UserSetResponse'] primary_approvers: The primary approver of the request. + """ + if approval_stage_time_out_in_days is not None: + pulumi.set(__self__, "approval_stage_time_out_in_days", approval_stage_time_out_in_days) + if escalation_approvers is not None: + pulumi.set(__self__, "escalation_approvers", escalation_approvers) + if escalation_time_in_minutes is not None: + pulumi.set(__self__, "escalation_time_in_minutes", escalation_time_in_minutes) + if is_approver_justification_required is not None: + pulumi.set(__self__, "is_approver_justification_required", is_approver_justification_required) + if is_escalation_enabled is not None: + pulumi.set(__self__, "is_escalation_enabled", is_escalation_enabled) + if primary_approvers is not None: + pulumi.set(__self__, "primary_approvers", primary_approvers) + + @property + @pulumi.getter(name="approvalStageTimeOutInDays") + def approval_stage_time_out_in_days(self) -> Optional[int]: + """ + The time in days when approval request would be timed out + """ + return pulumi.get(self, "approval_stage_time_out_in_days") + + @property + @pulumi.getter(name="escalationApprovers") + def escalation_approvers(self) -> Optional[Sequence['outputs.UserSetResponse']]: + """ + The escalation approver of the request. + """ + return pulumi.get(self, "escalation_approvers") + + @property + @pulumi.getter(name="escalationTimeInMinutes") + def escalation_time_in_minutes(self) -> Optional[int]: + """ + The time in minutes when the approval request would be escalated if the primary approver does not approve + """ + return pulumi.get(self, "escalation_time_in_minutes") + + @property + @pulumi.getter(name="isApproverJustificationRequired") + def is_approver_justification_required(self) -> Optional[bool]: + """ + Determines whether approver need to provide justification for his decision. + """ + return pulumi.get(self, "is_approver_justification_required") + + @property + @pulumi.getter(name="isEscalationEnabled") + def is_escalation_enabled(self) -> Optional[bool]: + """ + The value determine whether escalation feature is enabled. + """ + return pulumi.get(self, "is_escalation_enabled") + + @property + @pulumi.getter(name="primaryApprovers") + def primary_approvers(self) -> Optional[Sequence['outputs.UserSetResponse']]: + """ + The primary approver of the request. + """ + return pulumi.get(self, "primary_approvers") + + @pulumi.output_type class PolicyAssignmentPropertiesResponse(dict): @staticmethod @@ -271,6 +489,88 @@ def type(self) -> Optional[str]: return pulumi.get(self, "type") +@pulumi.output_type +class PolicyPropertiesResponse(dict): + def __init__(__self__, *, + scope: 'outputs.PolicyPropertiesResponseScope'): + """ + :param 'PolicyPropertiesResponseScope' scope: Details of the resource scope + """ + pulumi.set(__self__, "scope", scope) + + @property + @pulumi.getter + def scope(self) -> 'outputs.PolicyPropertiesResponseScope': + """ + Details of the resource scope + """ + return pulumi.get(self, "scope") + + +@pulumi.output_type +class PolicyPropertiesResponseScope(dict): + """ + Details of the resource scope + """ + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "displayName": + suggest = "display_name" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in PolicyPropertiesResponseScope. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + PolicyPropertiesResponseScope.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + PolicyPropertiesResponseScope.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + display_name: Optional[str] = None, + id: Optional[str] = None, + type: Optional[str] = None): + """ + Details of the resource scope + :param str display_name: Display name of the resource + :param str id: Scope id of the resource + :param str type: Type of the resource + """ + if display_name is not None: + pulumi.set(__self__, "display_name", display_name) + if id is not None: + pulumi.set(__self__, "id", id) + if type is not None: + pulumi.set(__self__, "type", type) + + @property + @pulumi.getter(name="displayName") + def display_name(self) -> Optional[str]: + """ + Display name of the resource + """ + return pulumi.get(self, "display_name") + + @property + @pulumi.getter + def id(self) -> Optional[str]: + """ + Scope id of the resource + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter + def type(self) -> Optional[str]: + """ + Type of the resource + """ + return pulumi.get(self, "type") + + @pulumi.output_type class PrincipalResponse(dict): """ @@ -347,3 +647,662 @@ def type(self) -> Optional[str]: return pulumi.get(self, "type") +@pulumi.output_type +class RoleManagementPolicyApprovalRuleResponse(dict): + """ + The role management policy approval rule. + """ + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "ruleType": + suggest = "rule_type" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in RoleManagementPolicyApprovalRuleResponse. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + RoleManagementPolicyApprovalRuleResponse.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + RoleManagementPolicyApprovalRuleResponse.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + rule_type: str, + id: Optional[str] = None, + setting: Optional['outputs.ApprovalSettingsResponse'] = None, + target: Optional['outputs.RoleManagementPolicyRuleTargetResponse'] = None): + """ + The role management policy approval rule. + :param str rule_type: The type of rule + Expected value is 'RoleManagementPolicyApprovalRule'. + :param str id: The id of the rule. + :param 'ApprovalSettingsResponse' setting: The approval setting + :param 'RoleManagementPolicyRuleTargetResponse' target: The target of the current rule. + """ + pulumi.set(__self__, "rule_type", 'RoleManagementPolicyApprovalRule') + if id is not None: + pulumi.set(__self__, "id", id) + if setting is not None: + pulumi.set(__self__, "setting", setting) + if target is not None: + pulumi.set(__self__, "target", target) + + @property + @pulumi.getter(name="ruleType") + def rule_type(self) -> str: + """ + The type of rule + Expected value is 'RoleManagementPolicyApprovalRule'. + """ + return pulumi.get(self, "rule_type") + + @property + @pulumi.getter + def id(self) -> Optional[str]: + """ + The id of the rule. + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter + def setting(self) -> Optional['outputs.ApprovalSettingsResponse']: + """ + The approval setting + """ + return pulumi.get(self, "setting") + + @property + @pulumi.getter + def target(self) -> Optional['outputs.RoleManagementPolicyRuleTargetResponse']: + """ + The target of the current rule. + """ + return pulumi.get(self, "target") + + +@pulumi.output_type +class RoleManagementPolicyAuthenticationContextRuleResponse(dict): + """ + The role management policy authentication context rule. + """ + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "ruleType": + suggest = "rule_type" + elif key == "claimValue": + suggest = "claim_value" + elif key == "isEnabled": + suggest = "is_enabled" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in RoleManagementPolicyAuthenticationContextRuleResponse. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + RoleManagementPolicyAuthenticationContextRuleResponse.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + RoleManagementPolicyAuthenticationContextRuleResponse.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + rule_type: str, + claim_value: Optional[str] = None, + id: Optional[str] = None, + is_enabled: Optional[bool] = None, + target: Optional['outputs.RoleManagementPolicyRuleTargetResponse'] = None): + """ + The role management policy authentication context rule. + :param str rule_type: The type of rule + Expected value is 'RoleManagementPolicyAuthenticationContextRule'. + :param str claim_value: The claim value. + :param str id: The id of the rule. + :param bool is_enabled: The value indicating if rule is enabled. + :param 'RoleManagementPolicyRuleTargetResponse' target: The target of the current rule. + """ + pulumi.set(__self__, "rule_type", 'RoleManagementPolicyAuthenticationContextRule') + if claim_value is not None: + pulumi.set(__self__, "claim_value", claim_value) + if id is not None: + pulumi.set(__self__, "id", id) + if is_enabled is not None: + pulumi.set(__self__, "is_enabled", is_enabled) + if target is not None: + pulumi.set(__self__, "target", target) + + @property + @pulumi.getter(name="ruleType") + def rule_type(self) -> str: + """ + The type of rule + Expected value is 'RoleManagementPolicyAuthenticationContextRule'. + """ + return pulumi.get(self, "rule_type") + + @property + @pulumi.getter(name="claimValue") + def claim_value(self) -> Optional[str]: + """ + The claim value. + """ + return pulumi.get(self, "claim_value") + + @property + @pulumi.getter + def id(self) -> Optional[str]: + """ + The id of the rule. + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter(name="isEnabled") + def is_enabled(self) -> Optional[bool]: + """ + The value indicating if rule is enabled. + """ + return pulumi.get(self, "is_enabled") + + @property + @pulumi.getter + def target(self) -> Optional['outputs.RoleManagementPolicyRuleTargetResponse']: + """ + The target of the current rule. + """ + return pulumi.get(self, "target") + + +@pulumi.output_type +class RoleManagementPolicyEnablementRuleResponse(dict): + """ + The role management policy rule. + """ + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "ruleType": + suggest = "rule_type" + elif key == "enabledRules": + suggest = "enabled_rules" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in RoleManagementPolicyEnablementRuleResponse. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + RoleManagementPolicyEnablementRuleResponse.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + RoleManagementPolicyEnablementRuleResponse.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + rule_type: str, + enabled_rules: Optional[Sequence[str]] = None, + id: Optional[str] = None, + target: Optional['outputs.RoleManagementPolicyRuleTargetResponse'] = None): + """ + The role management policy rule. + :param str rule_type: The type of rule + Expected value is 'RoleManagementPolicyEnablementRule'. + :param Sequence[str] enabled_rules: The list of enabled rules. + :param str id: The id of the rule. + :param 'RoleManagementPolicyRuleTargetResponse' target: The target of the current rule. + """ + pulumi.set(__self__, "rule_type", 'RoleManagementPolicyEnablementRule') + if enabled_rules is not None: + pulumi.set(__self__, "enabled_rules", enabled_rules) + if id is not None: + pulumi.set(__self__, "id", id) + if target is not None: + pulumi.set(__self__, "target", target) + + @property + @pulumi.getter(name="ruleType") + def rule_type(self) -> str: + """ + The type of rule + Expected value is 'RoleManagementPolicyEnablementRule'. + """ + return pulumi.get(self, "rule_type") + + @property + @pulumi.getter(name="enabledRules") + def enabled_rules(self) -> Optional[Sequence[str]]: + """ + The list of enabled rules. + """ + return pulumi.get(self, "enabled_rules") + + @property + @pulumi.getter + def id(self) -> Optional[str]: + """ + The id of the rule. + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter + def target(self) -> Optional['outputs.RoleManagementPolicyRuleTargetResponse']: + """ + The target of the current rule. + """ + return pulumi.get(self, "target") + + +@pulumi.output_type +class RoleManagementPolicyExpirationRuleResponse(dict): + """ + The role management policy expiration rule. + """ + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "ruleType": + suggest = "rule_type" + elif key == "isExpirationRequired": + suggest = "is_expiration_required" + elif key == "maximumDuration": + suggest = "maximum_duration" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in RoleManagementPolicyExpirationRuleResponse. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + RoleManagementPolicyExpirationRuleResponse.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + RoleManagementPolicyExpirationRuleResponse.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + rule_type: str, + id: Optional[str] = None, + is_expiration_required: Optional[bool] = None, + maximum_duration: Optional[str] = None, + target: Optional['outputs.RoleManagementPolicyRuleTargetResponse'] = None): + """ + The role management policy expiration rule. + :param str rule_type: The type of rule + Expected value is 'RoleManagementPolicyExpirationRule'. + :param str id: The id of the rule. + :param bool is_expiration_required: The value indicating whether expiration is required. + :param str maximum_duration: The maximum duration of expiration in timespan. + :param 'RoleManagementPolicyRuleTargetResponse' target: The target of the current rule. + """ + pulumi.set(__self__, "rule_type", 'RoleManagementPolicyExpirationRule') + if id is not None: + pulumi.set(__self__, "id", id) + if is_expiration_required is not None: + pulumi.set(__self__, "is_expiration_required", is_expiration_required) + if maximum_duration is not None: + pulumi.set(__self__, "maximum_duration", maximum_duration) + if target is not None: + pulumi.set(__self__, "target", target) + + @property + @pulumi.getter(name="ruleType") + def rule_type(self) -> str: + """ + The type of rule + Expected value is 'RoleManagementPolicyExpirationRule'. + """ + return pulumi.get(self, "rule_type") + + @property + @pulumi.getter + def id(self) -> Optional[str]: + """ + The id of the rule. + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter(name="isExpirationRequired") + def is_expiration_required(self) -> Optional[bool]: + """ + The value indicating whether expiration is required. + """ + return pulumi.get(self, "is_expiration_required") + + @property + @pulumi.getter(name="maximumDuration") + def maximum_duration(self) -> Optional[str]: + """ + The maximum duration of expiration in timespan. + """ + return pulumi.get(self, "maximum_duration") + + @property + @pulumi.getter + def target(self) -> Optional['outputs.RoleManagementPolicyRuleTargetResponse']: + """ + The target of the current rule. + """ + return pulumi.get(self, "target") + + +@pulumi.output_type +class RoleManagementPolicyNotificationRuleResponse(dict): + """ + The role management policy notification rule. + """ + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "ruleType": + suggest = "rule_type" + elif key == "isDefaultRecipientsEnabled": + suggest = "is_default_recipients_enabled" + elif key == "notificationLevel": + suggest = "notification_level" + elif key == "notificationRecipients": + suggest = "notification_recipients" + elif key == "notificationType": + suggest = "notification_type" + elif key == "recipientType": + suggest = "recipient_type" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in RoleManagementPolicyNotificationRuleResponse. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + RoleManagementPolicyNotificationRuleResponse.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + RoleManagementPolicyNotificationRuleResponse.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + rule_type: str, + id: Optional[str] = None, + is_default_recipients_enabled: Optional[bool] = None, + notification_level: Optional[str] = None, + notification_recipients: Optional[Sequence[str]] = None, + notification_type: Optional[str] = None, + recipient_type: Optional[str] = None, + target: Optional['outputs.RoleManagementPolicyRuleTargetResponse'] = None): + """ + The role management policy notification rule. + :param str rule_type: The type of rule + Expected value is 'RoleManagementPolicyNotificationRule'. + :param str id: The id of the rule. + :param bool is_default_recipients_enabled: Determines if the notification will be sent to the recipient type specified in the policy rule. + :param str notification_level: The notification level. + :param Sequence[str] notification_recipients: The list of notification recipients. + :param str notification_type: The type of notification. + :param str recipient_type: The recipient type. + :param 'RoleManagementPolicyRuleTargetResponse' target: The target of the current rule. + """ + pulumi.set(__self__, "rule_type", 'RoleManagementPolicyNotificationRule') + if id is not None: + pulumi.set(__self__, "id", id) + if is_default_recipients_enabled is not None: + pulumi.set(__self__, "is_default_recipients_enabled", is_default_recipients_enabled) + if notification_level is not None: + pulumi.set(__self__, "notification_level", notification_level) + if notification_recipients is not None: + pulumi.set(__self__, "notification_recipients", notification_recipients) + if notification_type is not None: + pulumi.set(__self__, "notification_type", notification_type) + if recipient_type is not None: + pulumi.set(__self__, "recipient_type", recipient_type) + if target is not None: + pulumi.set(__self__, "target", target) + + @property + @pulumi.getter(name="ruleType") + def rule_type(self) -> str: + """ + The type of rule + Expected value is 'RoleManagementPolicyNotificationRule'. + """ + return pulumi.get(self, "rule_type") + + @property + @pulumi.getter + def id(self) -> Optional[str]: + """ + The id of the rule. + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter(name="isDefaultRecipientsEnabled") + def is_default_recipients_enabled(self) -> Optional[bool]: + """ + Determines if the notification will be sent to the recipient type specified in the policy rule. + """ + return pulumi.get(self, "is_default_recipients_enabled") + + @property + @pulumi.getter(name="notificationLevel") + def notification_level(self) -> Optional[str]: + """ + The notification level. + """ + return pulumi.get(self, "notification_level") + + @property + @pulumi.getter(name="notificationRecipients") + def notification_recipients(self) -> Optional[Sequence[str]]: + """ + The list of notification recipients. + """ + return pulumi.get(self, "notification_recipients") + + @property + @pulumi.getter(name="notificationType") + def notification_type(self) -> Optional[str]: + """ + The type of notification. + """ + return pulumi.get(self, "notification_type") + + @property + @pulumi.getter(name="recipientType") + def recipient_type(self) -> Optional[str]: + """ + The recipient type. + """ + return pulumi.get(self, "recipient_type") + + @property + @pulumi.getter + def target(self) -> Optional['outputs.RoleManagementPolicyRuleTargetResponse']: + """ + The target of the current rule. + """ + return pulumi.get(self, "target") + + +@pulumi.output_type +class RoleManagementPolicyRuleTargetResponse(dict): + """ + The role management policy rule target. + """ + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "enforcedSettings": + suggest = "enforced_settings" + elif key == "inheritableSettings": + suggest = "inheritable_settings" + elif key == "targetObjects": + suggest = "target_objects" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in RoleManagementPolicyRuleTargetResponse. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + RoleManagementPolicyRuleTargetResponse.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + RoleManagementPolicyRuleTargetResponse.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + caller: Optional[str] = None, + enforced_settings: Optional[Sequence[str]] = None, + inheritable_settings: Optional[Sequence[str]] = None, + level: Optional[str] = None, + operations: Optional[Sequence[str]] = None, + target_objects: Optional[Sequence[str]] = None): + """ + The role management policy rule target. + :param str caller: The caller of the setting. + :param Sequence[str] enforced_settings: The list of enforced settings. + :param Sequence[str] inheritable_settings: The list of inheritable settings. + :param str level: The assignment level to which rule is applied. + :param Sequence[str] operations: The type of operation. + :param Sequence[str] target_objects: The list of target objects. + """ + if caller is not None: + pulumi.set(__self__, "caller", caller) + if enforced_settings is not None: + pulumi.set(__self__, "enforced_settings", enforced_settings) + if inheritable_settings is not None: + pulumi.set(__self__, "inheritable_settings", inheritable_settings) + if level is not None: + pulumi.set(__self__, "level", level) + if operations is not None: + pulumi.set(__self__, "operations", operations) + if target_objects is not None: + pulumi.set(__self__, "target_objects", target_objects) + + @property + @pulumi.getter + def caller(self) -> Optional[str]: + """ + The caller of the setting. + """ + return pulumi.get(self, "caller") + + @property + @pulumi.getter(name="enforcedSettings") + def enforced_settings(self) -> Optional[Sequence[str]]: + """ + The list of enforced settings. + """ + return pulumi.get(self, "enforced_settings") + + @property + @pulumi.getter(name="inheritableSettings") + def inheritable_settings(self) -> Optional[Sequence[str]]: + """ + The list of inheritable settings. + """ + return pulumi.get(self, "inheritable_settings") + + @property + @pulumi.getter + def level(self) -> Optional[str]: + """ + The assignment level to which rule is applied. + """ + return pulumi.get(self, "level") + + @property + @pulumi.getter + def operations(self) -> Optional[Sequence[str]]: + """ + The type of operation. + """ + return pulumi.get(self, "operations") + + @property + @pulumi.getter(name="targetObjects") + def target_objects(self) -> Optional[Sequence[str]]: + """ + The list of target objects. + """ + return pulumi.get(self, "target_objects") + + +@pulumi.output_type +class UserSetResponse(dict): + """ + The detail of a user. + """ + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "isBackup": + suggest = "is_backup" + elif key == "userType": + suggest = "user_type" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in UserSetResponse. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + UserSetResponse.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + UserSetResponse.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + description: Optional[str] = None, + id: Optional[str] = None, + is_backup: Optional[bool] = None, + user_type: Optional[str] = None): + """ + The detail of a user. + :param str description: The description of the user. + :param str id: The object id of the user. + :param bool is_backup: The value indicating whether the user is a backup fallback approver + :param str user_type: The type of user. + """ + if description is not None: + pulumi.set(__self__, "description", description) + if id is not None: + pulumi.set(__self__, "id", id) + if is_backup is not None: + pulumi.set(__self__, "is_backup", is_backup) + if user_type is not None: + pulumi.set(__self__, "user_type", user_type) + + @property + @pulumi.getter + def description(self) -> Optional[str]: + """ + The description of the user. + """ + return pulumi.get(self, "description") + + @property + @pulumi.getter + def id(self) -> Optional[str]: + """ + The object id of the user. + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter(name="isBackup") + def is_backup(self) -> Optional[bool]: + """ + The value indicating whether the user is a backup fallback approver + """ + return pulumi.get(self, "is_backup") + + @property + @pulumi.getter(name="userType") + def user_type(self) -> Optional[str]: + """ + The type of user. + """ + return pulumi.get(self, "user_type") + + diff --git a/sdk/python/pulumi_azure_native/authorization/v20201001preview/role_management_policy.py b/sdk/python/pulumi_azure_native/authorization/v20201001preview/role_management_policy.py new file mode 100644 index 000000000000..51e2082880d2 --- /dev/null +++ b/sdk/python/pulumi_azure_native/authorization/v20201001preview/role_management_policy.py @@ -0,0 +1,321 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumi-language-python. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from ... import _utilities +from . import outputs +from ._enums import * +from ._inputs import * + +__all__ = ['RoleManagementPolicyArgs', 'RoleManagementPolicy'] + +@pulumi.input_type +class RoleManagementPolicyArgs: + def __init__(__self__, *, + scope: pulumi.Input[str], + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + is_organization_default: Optional[pulumi.Input[bool]] = None, + role_management_policy_name: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RoleManagementPolicyApprovalRuleArgs', 'RoleManagementPolicyAuthenticationContextRuleArgs', 'RoleManagementPolicyEnablementRuleArgs', 'RoleManagementPolicyExpirationRuleArgs', 'RoleManagementPolicyNotificationRuleArgs']]]]] = None): + """ + The set of arguments for constructing a RoleManagementPolicy resource. + :param pulumi.Input[str] scope: The role management policy scope. + :param pulumi.Input[str] description: The role management policy description. + :param pulumi.Input[str] display_name: The role management policy display name. + :param pulumi.Input[bool] is_organization_default: The role management policy is default policy. + :param pulumi.Input[str] role_management_policy_name: The name (guid) of the role management policy to upsert. + :param pulumi.Input[Sequence[pulumi.Input[Union['RoleManagementPolicyApprovalRuleArgs', 'RoleManagementPolicyAuthenticationContextRuleArgs', 'RoleManagementPolicyEnablementRuleArgs', 'RoleManagementPolicyExpirationRuleArgs', 'RoleManagementPolicyNotificationRuleArgs']]]] rules: The rule applied to the policy. + """ + pulumi.set(__self__, "scope", scope) + if description is not None: + pulumi.set(__self__, "description", description) + if display_name is not None: + pulumi.set(__self__, "display_name", display_name) + if is_organization_default is not None: + pulumi.set(__self__, "is_organization_default", is_organization_default) + if role_management_policy_name is not None: + pulumi.set(__self__, "role_management_policy_name", role_management_policy_name) + if rules is not None: + pulumi.set(__self__, "rules", rules) + + @property + @pulumi.getter + def scope(self) -> pulumi.Input[str]: + """ + The role management policy scope. + """ + return pulumi.get(self, "scope") + + @scope.setter + def scope(self, value: pulumi.Input[str]): + pulumi.set(self, "scope", value) + + @property + @pulumi.getter + def description(self) -> Optional[pulumi.Input[str]]: + """ + The role management policy description. + """ + return pulumi.get(self, "description") + + @description.setter + def description(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "description", value) + + @property + @pulumi.getter(name="displayName") + def display_name(self) -> Optional[pulumi.Input[str]]: + """ + The role management policy display name. + """ + return pulumi.get(self, "display_name") + + @display_name.setter + def display_name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "display_name", value) + + @property + @pulumi.getter(name="isOrganizationDefault") + def is_organization_default(self) -> Optional[pulumi.Input[bool]]: + """ + The role management policy is default policy. + """ + return pulumi.get(self, "is_organization_default") + + @is_organization_default.setter + def is_organization_default(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "is_organization_default", value) + + @property + @pulumi.getter(name="roleManagementPolicyName") + def role_management_policy_name(self) -> Optional[pulumi.Input[str]]: + """ + The name (guid) of the role management policy to upsert. + """ + return pulumi.get(self, "role_management_policy_name") + + @role_management_policy_name.setter + def role_management_policy_name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "role_management_policy_name", value) + + @property + @pulumi.getter + def rules(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[Union['RoleManagementPolicyApprovalRuleArgs', 'RoleManagementPolicyAuthenticationContextRuleArgs', 'RoleManagementPolicyEnablementRuleArgs', 'RoleManagementPolicyExpirationRuleArgs', 'RoleManagementPolicyNotificationRuleArgs']]]]]: + """ + The rule applied to the policy. + """ + return pulumi.get(self, "rules") + + @rules.setter + def rules(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RoleManagementPolicyApprovalRuleArgs', 'RoleManagementPolicyAuthenticationContextRuleArgs', 'RoleManagementPolicyEnablementRuleArgs', 'RoleManagementPolicyExpirationRuleArgs', 'RoleManagementPolicyNotificationRuleArgs']]]]]): + pulumi.set(self, "rules", value) + + +class RoleManagementPolicy(pulumi.CustomResource): + @overload + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + is_organization_default: Optional[pulumi.Input[bool]] = None, + role_management_policy_name: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union[pulumi.InputType['RoleManagementPolicyApprovalRuleArgs'], pulumi.InputType['RoleManagementPolicyAuthenticationContextRuleArgs'], pulumi.InputType['RoleManagementPolicyEnablementRuleArgs'], pulumi.InputType['RoleManagementPolicyExpirationRuleArgs'], pulumi.InputType['RoleManagementPolicyNotificationRuleArgs']]]]]] = None, + scope: Optional[pulumi.Input[str]] = None, + __props__=None): + """ + Role management policy + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] description: The role management policy description. + :param pulumi.Input[str] display_name: The role management policy display name. + :param pulumi.Input[bool] is_organization_default: The role management policy is default policy. + :param pulumi.Input[str] role_management_policy_name: The name (guid) of the role management policy to upsert. + :param pulumi.Input[Sequence[pulumi.Input[Union[pulumi.InputType['RoleManagementPolicyApprovalRuleArgs'], pulumi.InputType['RoleManagementPolicyAuthenticationContextRuleArgs'], pulumi.InputType['RoleManagementPolicyEnablementRuleArgs'], pulumi.InputType['RoleManagementPolicyExpirationRuleArgs'], pulumi.InputType['RoleManagementPolicyNotificationRuleArgs']]]]] rules: The rule applied to the policy. + :param pulumi.Input[str] scope: The role management policy scope. + """ + ... + @overload + def __init__(__self__, + resource_name: str, + args: RoleManagementPolicyArgs, + opts: Optional[pulumi.ResourceOptions] = None): + """ + Role management policy + + :param str resource_name: The name of the resource. + :param RoleManagementPolicyArgs args: The arguments to use to populate this resource's properties. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + ... + def __init__(__self__, resource_name: str, *args, **kwargs): + resource_args, opts = _utilities.get_resource_args_opts(RoleManagementPolicyArgs, pulumi.ResourceOptions, *args, **kwargs) + if resource_args is not None: + __self__._internal_init(resource_name, opts, **resource_args.__dict__) + else: + __self__._internal_init(resource_name, *args, **kwargs) + + def _internal_init(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + description: Optional[pulumi.Input[str]] = None, + display_name: Optional[pulumi.Input[str]] = None, + is_organization_default: Optional[pulumi.Input[bool]] = None, + role_management_policy_name: Optional[pulumi.Input[str]] = None, + rules: Optional[pulumi.Input[Sequence[pulumi.Input[Union[pulumi.InputType['RoleManagementPolicyApprovalRuleArgs'], pulumi.InputType['RoleManagementPolicyAuthenticationContextRuleArgs'], pulumi.InputType['RoleManagementPolicyEnablementRuleArgs'], pulumi.InputType['RoleManagementPolicyExpirationRuleArgs'], pulumi.InputType['RoleManagementPolicyNotificationRuleArgs']]]]]] = None, + scope: Optional[pulumi.Input[str]] = None, + __props__=None): + opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = RoleManagementPolicyArgs.__new__(RoleManagementPolicyArgs) + + __props__.__dict__["description"] = description + __props__.__dict__["display_name"] = display_name + __props__.__dict__["is_organization_default"] = is_organization_default + __props__.__dict__["role_management_policy_name"] = role_management_policy_name + __props__.__dict__["rules"] = rules + if scope is None and not opts.urn: + raise TypeError("Missing required property 'scope'") + __props__.__dict__["scope"] = scope + __props__.__dict__["effective_rules"] = None + __props__.__dict__["last_modified_by"] = None + __props__.__dict__["last_modified_date_time"] = None + __props__.__dict__["name"] = None + __props__.__dict__["policy_properties"] = None + __props__.__dict__["type"] = None + alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="azure-native:authorization:RoleManagementPolicy"), pulumi.Alias(type_="azure-native:authorization/v20201001:RoleManagementPolicy")]) + opts = pulumi.ResourceOptions.merge(opts, alias_opts) + super(RoleManagementPolicy, __self__).__init__( + 'azure-native:authorization/v20201001preview:RoleManagementPolicy', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None) -> 'RoleManagementPolicy': + """ + Get an existing RoleManagementPolicy resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = RoleManagementPolicyArgs.__new__(RoleManagementPolicyArgs) + + __props__.__dict__["description"] = None + __props__.__dict__["display_name"] = None + __props__.__dict__["effective_rules"] = None + __props__.__dict__["is_organization_default"] = None + __props__.__dict__["last_modified_by"] = None + __props__.__dict__["last_modified_date_time"] = None + __props__.__dict__["name"] = None + __props__.__dict__["policy_properties"] = None + __props__.__dict__["rules"] = None + __props__.__dict__["scope"] = None + __props__.__dict__["type"] = None + return RoleManagementPolicy(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter + def description(self) -> pulumi.Output[Optional[str]]: + """ + The role management policy description. + """ + return pulumi.get(self, "description") + + @property + @pulumi.getter(name="displayName") + def display_name(self) -> pulumi.Output[Optional[str]]: + """ + The role management policy display name. + """ + return pulumi.get(self, "display_name") + + @property + @pulumi.getter(name="effectiveRules") + def effective_rules(self) -> pulumi.Output[Sequence[Any]]: + """ + The readonly computed rule applied to the policy. + """ + return pulumi.get(self, "effective_rules") + + @property + @pulumi.getter(name="isOrganizationDefault") + def is_organization_default(self) -> pulumi.Output[Optional[bool]]: + """ + The role management policy is default policy. + """ + return pulumi.get(self, "is_organization_default") + + @property + @pulumi.getter(name="lastModifiedBy") + def last_modified_by(self) -> pulumi.Output['outputs.PrincipalResponse']: + """ + The name of the entity last modified it + """ + return pulumi.get(self, "last_modified_by") + + @property + @pulumi.getter(name="lastModifiedDateTime") + def last_modified_date_time(self) -> pulumi.Output[str]: + """ + The last modified date time. + """ + return pulumi.get(self, "last_modified_date_time") + + @property + @pulumi.getter + def name(self) -> pulumi.Output[str]: + """ + The role management policy name. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter(name="policyProperties") + def policy_properties(self) -> pulumi.Output['outputs.PolicyPropertiesResponse']: + """ + Additional properties of scope + """ + return pulumi.get(self, "policy_properties") + + @property + @pulumi.getter + def rules(self) -> pulumi.Output[Optional[Sequence[Any]]]: + """ + The rule applied to the policy. + """ + return pulumi.get(self, "rules") + + @property + @pulumi.getter + def scope(self) -> pulumi.Output[Optional[str]]: + """ + The role management policy scope. + """ + return pulumi.get(self, "scope") + + @property + @pulumi.getter + def type(self) -> pulumi.Output[str]: + """ + The role management policy type. + """ + return pulumi.get(self, "type") +