From 7c63f7144358f5cdcccaa3691d9ff0f497273f62 Mon Sep 17 00:00:00 2001 From: Pulumi Bot <30351955+pulumi-bot@users.noreply.github.com> Date: Thu, 27 Jul 2023 09:04:28 -0700 Subject: [PATCH] Upgrade terraform-provider-azuread to v2.41.0 (#405) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found 1 breaking change: Resources 🟢 "azuread:index/conditionalAccessPolicy:ConditionalAccessPolicy": required: "grantControls" property is no longer Required New functions: index/getDirectoryRoleTemplates.getDirectoryRoleTemplates index/getNamedLocation.getNamedLocation --------- Co-authored-by: pulumi-bot --- .../bridge-metadata.json | 62 +++ .../cmd/pulumi-resource-azuread/schema.json | 173 +++++- provider/go.mod | 12 +- provider/go.sum | 25 +- provider/shim/go.mod | 4 +- provider/shim/go.sum | 8 +- sdk/dotnet/ConditionalAccessPolicy.cs | 12 +- sdk/dotnet/GetDirectoryRoleTemplates.cs | 82 +++ sdk/dotnet/GetNamedLocation.cs | 186 +++++++ ...nmentPolicyAssignmentReviewSettingsArgs.cs | 2 +- ...ntPolicyAssignmentReviewSettingsGetArgs.cs | 2 +- .../ConditionalAccessPolicyConditionsArgs.cs | 14 +- ...onditionalAccessPolicyConditionsGetArgs.cs | 14 +- sdk/dotnet/Inputs/NamedLocationIpArgs.cs | 2 +- sdk/dotnet/Inputs/NamedLocationIpGetArgs.cs | 2 +- ...ssignmentPolicyAssignmentReviewSettings.cs | 2 +- .../ConditionalAccessPolicyConditions.cs | 9 +- ...irectoryRoleTemplatesRoleTemplateResult.cs | 42 ++ .../Outputs/GetNamedLocationCountryResult.cs | 29 + .../Outputs/GetNamedLocationIpResult.cs | 29 + sdk/dotnet/Outputs/NamedLocationIp.cs | 2 +- sdk/go/azuread/accessPackage.go | 2 + .../azuread/accessPackageAssignmentPolicy.go | 2 + sdk/go/azuread/accessPackageCatalog.go | 2 + .../accessPackageCatalogRoleAssignment.go | 2 + ...accessPackageResourceCatalogAssociation.go | 2 + ...accessPackageResourcePackageAssociation.go | 2 + sdk/go/azuread/administrativeUnit.go | 2 + sdk/go/azuread/administrativeUnitMember.go | 2 + .../azuread/administrativeUnitRoleMember.go | 2 + sdk/go/azuread/appRoleAssignment.go | 2 + sdk/go/azuread/application.go | 2 + sdk/go/azuread/applicationCertificate.go | 2 + .../applicationFederatedIdentityCredential.go | 2 + sdk/go/azuread/applicationPassword.go | 2 + sdk/go/azuread/applicationPreAuthorized.go | 2 + sdk/go/azuread/claimsMappingPolicy.go | 2 + sdk/go/azuread/conditionalAccessPolicy.go | 27 +- sdk/go/azuread/config/config.go | 9 +- sdk/go/azuread/customDirectoryRole.go | 2 + sdk/go/azuread/directoryRole.go | 2 + sdk/go/azuread/directoryRoleAssignment.go | 2 + sdk/go/azuread/directoryRoleMember.go | 2 + sdk/go/azuread/getAccessPackage.go | 2 + sdk/go/azuread/getAccessPackageCatalog.go | 2 + sdk/go/azuread/getAccessPackageCatalogRole.go | 2 + sdk/go/azuread/getAdministrativeUnit.go | 2 + sdk/go/azuread/getApplication.go | 2 + .../azuread/getApplicationPublishedAppIds.go | 2 + sdk/go/azuread/getApplicationTemplate.go | 2 + sdk/go/azuread/getClientConfig.go | 2 + sdk/go/azuread/getDirectoryObject.go | 2 + sdk/go/azuread/getDirectoryRoleTemplates.go | 63 +++ sdk/go/azuread/getDirectoryRoles.go | 2 + sdk/go/azuread/getDomains.go | 2 + sdk/go/azuread/getGroup.go | 2 + sdk/go/azuread/getGroups.go | 2 + sdk/go/azuread/getNamedLocation.go | 152 +++++ sdk/go/azuread/getServicePrincipal.go | 2 + sdk/go/azuread/getServicePrincipals.go | 2 + sdk/go/azuread/getUser.go | 2 + sdk/go/azuread/getUsers.go | 2 + sdk/go/azuread/group.go | 2 + sdk/go/azuread/groupMember.go | 2 + sdk/go/azuread/init.go | 6 +- .../{config => internal}/pulumiUtilities.go | 40 +- sdk/go/azuread/internal/pulumiVersion.go | 11 + sdk/go/azuread/invitation.go | 2 + sdk/go/azuread/namedLocation.go | 2 + sdk/go/azuread/provider.go | 8 +- sdk/go/azuread/pulumiTypes.go | 373 ++++++++++++- sdk/go/azuread/pulumiUtilities.go | 87 --- sdk/go/azuread/servicePrincipal.go | 2 + sdk/go/azuread/servicePrincipalCertificate.go | 2 + ...ePrincipalClaimsMappingPolicyAssignment.go | 2 + ...ervicePrincipalDelegatedPermissionGrant.go | 2 + sdk/go/azuread/servicePrincipalPassword.go | 2 + ...servicePrincipalTokenSigningCertificate.go | 2 + sdk/go/azuread/synchronizationJob.go | 2 + sdk/go/azuread/synchronizationSecret.go | 2 + sdk/go/azuread/user.go | 2 + sdk/go/azuread/userFlowAttribute.go | 2 + .../com/pulumi/azuread/AzureadFunctions.java | 526 ++++++++++++++++++ .../azuread/ConditionalAccessPolicy.java | 10 +- .../azuread/ConditionalAccessPolicyArgs.java | 19 +- ...entPolicyAssignmentReviewSettingsArgs.java | 8 +- ...ConditionalAccessPolicyConditionsArgs.java | 57 +- .../inputs/ConditionalAccessPolicyState.java | 8 + .../azuread/inputs/GetNamedLocationArgs.java | 82 +++ .../inputs/GetNamedLocationPlainArgs.java | 71 +++ .../azuread/inputs/NamedLocationIpArgs.java | 10 +- ...ignmentPolicyAssignmentReviewSettings.java | 4 +- .../ConditionalAccessPolicyConditions.java | 27 +- .../GetDirectoryRoleTemplatesResult.java | 102 ++++ ...GetDirectoryRoleTemplatesRoleTemplate.java | 94 ++++ .../outputs/GetNamedLocationCountry.java | 63 +++ .../azuread/outputs/GetNamedLocationIp.java | 63 +++ .../outputs/GetNamedLocationResult.java | 99 ++++ .../azuread/outputs/NamedLocationIp.java | 4 +- sdk/nodejs/conditionalAccessPolicy.ts | 13 +- sdk/nodejs/getDirectoryRoleTemplates.ts | 53 ++ sdk/nodejs/getNamedLocation.ts | 137 +++++ sdk/nodejs/index.ts | 9 + sdk/nodejs/provider.ts | 2 +- sdk/nodejs/tsconfig.json | 2 + sdk/nodejs/types/input.ts | 10 +- sdk/nodejs/types/output.ts | 35 +- sdk/python/pulumi_azuread/__init__.py | 2 + sdk/python/pulumi_azuread/_inputs.py | 28 +- .../conditional_access_policy.py | 49 +- .../get_directory_role_templates.py | 100 ++++ .../pulumi_azuread/get_named_location.py | 180 ++++++ sdk/python/pulumi_azuread/outputs.py | 107 +++- 113 files changed, 3329 insertions(+), 236 deletions(-) create mode 100644 sdk/dotnet/GetDirectoryRoleTemplates.cs create mode 100644 sdk/dotnet/GetNamedLocation.cs create mode 100644 sdk/dotnet/Outputs/GetDirectoryRoleTemplatesRoleTemplateResult.cs create mode 100644 sdk/dotnet/Outputs/GetNamedLocationCountryResult.cs create mode 100644 sdk/dotnet/Outputs/GetNamedLocationIpResult.cs create mode 100644 sdk/go/azuread/getDirectoryRoleTemplates.go create mode 100644 sdk/go/azuread/getNamedLocation.go rename sdk/go/azuread/{config => internal}/pulumiUtilities.go (60%) create mode 100644 sdk/go/azuread/internal/pulumiVersion.go delete mode 100644 sdk/go/azuread/pulumiUtilities.go create mode 100644 sdk/java/src/main/java/com/pulumi/azuread/inputs/GetNamedLocationArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/azuread/inputs/GetNamedLocationPlainArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/azuread/outputs/GetDirectoryRoleTemplatesResult.java create mode 100644 sdk/java/src/main/java/com/pulumi/azuread/outputs/GetDirectoryRoleTemplatesRoleTemplate.java create mode 100644 sdk/java/src/main/java/com/pulumi/azuread/outputs/GetNamedLocationCountry.java create mode 100644 sdk/java/src/main/java/com/pulumi/azuread/outputs/GetNamedLocationIp.java create mode 100644 sdk/java/src/main/java/com/pulumi/azuread/outputs/GetNamedLocationResult.java create mode 100644 sdk/nodejs/getDirectoryRoleTemplates.ts create mode 100644 sdk/nodejs/getNamedLocation.ts create mode 100644 sdk/python/pulumi_azuread/get_directory_role_templates.py create mode 100644 sdk/python/pulumi_azuread/get_named_location.py diff --git a/provider/cmd/pulumi-resource-azuread/bridge-metadata.json b/provider/cmd/pulumi-resource-azuread/bridge-metadata.json index 35eb43710..0ad1e3b8c 100644 --- a/provider/cmd/pulumi-resource-azuread/bridge-metadata.json +++ b/provider/cmd/pulumi-resource-azuread/bridge-metadata.json @@ -595,6 +595,9 @@ } } }, + "service_principal_risk_levels": { + "maxItemsOne": false + }, "sign_in_risk_levels": { "maxItemsOne": false, "elem": {} @@ -1291,6 +1294,17 @@ "azuread_directory_object": { "current": "azuread:index/getDirectoryObject:getDirectoryObject" }, + "azuread_directory_role_templates": { + "current": "azuread:index/getDirectoryRoleTemplates:getDirectoryRoleTemplates", + "fields": { + "object_ids": { + "maxItemsOne": false + }, + "role_templates": { + "maxItemsOne": false + } + } + }, "azuread_directory_roles": { "current": "azuread:index/getDirectoryRoles:getDirectoryRoles", "fields": { @@ -1360,6 +1374,31 @@ } } }, + "azuread_named_location": { + "current": "azuread:index/getNamedLocation:getNamedLocation", + "fields": { + "country": { + "maxItemsOne": false, + "elem": { + "fields": { + "countries_and_regions": { + "maxItemsOne": false + } + } + } + }, + "ip": { + "maxItemsOne": false, + "elem": { + "fields": { + "ip_ranges": { + "maxItemsOne": false + } + } + } + } + } + }, "azuread_service_principal": { "current": "azuread:index/getServicePrincipal:getServicePrincipal", "fields": { @@ -1516,10 +1555,12 @@ "azuread:index/getApplicationTemplate:getApplicationTemplate": "azuread_application_template", "azuread:index/getClientConfig:getClientConfig": "azuread_client_config", "azuread:index/getDirectoryObject:getDirectoryObject": "azuread_directory_object", + "azuread:index/getDirectoryRoleTemplates:getDirectoryRoleTemplates": "azuread_directory_role_templates", "azuread:index/getDirectoryRoles:getDirectoryRoles": "azuread_directory_roles", "azuread:index/getDomains:getDomains": "azuread_domains", "azuread:index/getGroup:getGroup": "azuread_group", "azuread:index/getGroups:getGroups": "azuread_groups", + "azuread:index/getNamedLocation:getNamedLocation": "azuread_named_location", "azuread:index/getServicePrincipal:getServicePrincipal": "azuread_service_principal", "azuread:index/getServicePrincipals:getServicePrincipals": "azuread_service_principals", "azuread:index/getUser:getUser": "azuread_user", @@ -1648,6 +1689,7 @@ "azuread:index/ConditionalAccessPolicyConditions:ConditionalAccessPolicyConditions": { "clientAppTypes": "client_app_types", "clientApplications": "client_applications", + "servicePrincipalRiskLevels": "service_principal_risk_levels", "signInRiskLevels": "sign_in_risk_levels", "userRiskLevels": "user_risk_levels" }, @@ -1985,6 +2027,14 @@ "azuread:index/getDirectoryObject:getDirectoryObject": { "objectId": "object_id" }, + "azuread:index/getDirectoryRoleTemplates:getDirectoryRoleTemplates": { + "objectIds": "object_ids", + "roleTemplates": "role_templates" + }, + "azuread:index/getDirectoryRoleTemplatesRoleTemplate:getDirectoryRoleTemplatesRoleTemplate": { + "displayName": "display_name", + "objectId": "object_id" + }, "azuread:index/getDirectoryRoles:getDirectoryRoles": { "objectIds": "object_ids", "templateIds": "template_ids" @@ -2040,6 +2090,18 @@ "returnAll": "return_all", "securityEnabled": "security_enabled" }, + "azuread:index/getNamedLocation:getNamedLocation": { + "countries": "country", + "displayName": "display_name", + "ips": "ip" + }, + "azuread:index/getNamedLocationCountry:getNamedLocationCountry": { + "countriesAndRegions": "countries_and_regions", + "includeUnknownCountriesAndRegions": "include_unknown_countries_and_regions" + }, + "azuread:index/getNamedLocationIp:getNamedLocationIp": { + "ipRanges": "ip_ranges" + }, "azuread:index/getServicePrincipal:getServicePrincipal": { "accountEnabled": "account_enabled", "alternativeNames": "alternative_names", diff --git a/provider/cmd/pulumi-resource-azuread/schema.json b/provider/cmd/pulumi-resource-azuread/schema.json index a2203c19c..5bbef3f27 100644 --- a/provider/cmd/pulumi-resource-azuread/schema.json +++ b/provider/cmd/pulumi-resource-azuread/schema.json @@ -281,7 +281,7 @@ }, "reviewType": { "type": "string", - "description": "Self review or specific reviewers. Valid values are `Self`, or `Reviewers`.\n" + "description": "Self-review or specific reviewers. Valid values are `Manager`, `Reviewers`, or `Self`.\n" }, "reviewers": { "type": "array", @@ -829,12 +829,19 @@ "$ref": "#/types/azuread:index/ConditionalAccessPolicyConditionsPlatforms:ConditionalAccessPolicyConditionsPlatforms", "description": "A `platforms` block as documented below, which specifies platforms included in and excluded from the policy.\n" }, + "servicePrincipalRiskLevels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of service principal sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `none`, `unknownFutureValue`.\n" + }, "signInRiskLevels": { "type": "array", "items": { "type": "string" }, - "description": "A list of sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`.\n" + "description": "A list of user sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`.\n" }, "userRiskLevels": { "type": "array", @@ -1155,7 +1162,7 @@ "items": { "type": "string" }, - "description": "List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596.\n" + "description": "List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596.\n" }, "trusted": { "type": "boolean", @@ -1778,6 +1785,33 @@ } } }, + "azuread:index/getDirectoryRoleTemplatesRoleTemplate:getDirectoryRoleTemplatesRoleTemplate": { + "properties": { + "description": { + "type": "string", + "description": "The description of the directory role template.\n" + }, + "displayName": { + "type": "string", + "description": "The display name of the directory role template.\n" + }, + "objectId": { + "type": "string", + "description": "The object ID of the directory role template.\n" + } + }, + "type": "object", + "required": [ + "description", + "displayName", + "objectId" + ], + "language": { + "nodejs": { + "requiredInputs": [] + } + } + }, "azuread:index/getDirectoryRolesRole:getDirectoryRolesRole": { "properties": { "description": { @@ -1887,6 +1921,52 @@ } } }, + "azuread:index/getNamedLocationCountry:getNamedLocationCountry": { + "properties": { + "countriesAndRegions": { + "type": "array", + "items": { + "type": "string" + } + }, + "includeUnknownCountriesAndRegions": { + "type": "boolean" + } + }, + "type": "object", + "required": [ + "countriesAndRegions", + "includeUnknownCountriesAndRegions" + ], + "language": { + "nodejs": { + "requiredInputs": [] + } + } + }, + "azuread:index/getNamedLocationIp:getNamedLocationIp": { + "properties": { + "ipRanges": { + "type": "array", + "items": { + "type": "string" + } + }, + "trusted": { + "type": "boolean" + } + }, + "type": "object", + "required": [ + "ipRanges", + "trusted" + ], + "language": { + "nodejs": { + "requiredInputs": [] + } + } + }, "azuread:index/getServicePrincipalAppRole:getServicePrincipalAppRole": { "properties": { "allowedMemberTypes": { @@ -4189,7 +4269,7 @@ }, "sessionControls": { "$ref": "#/types/azuread:index/ConditionalAccessPolicySessionControls:ConditionalAccessPolicySessionControls", - "description": "A `session_controls` block as documented below, which specifies the session controls that are enforced after sign-in.\n" + "description": "A `session_controls` block as documented below, which specifies the session controls that are enforced after sign-in.\n\n\u003e Note: At least one of `grant_controls` and/or `session_controls` blocks must be specified.\n" }, "state": { "type": "string", @@ -4199,7 +4279,6 @@ "required": [ "conditions", "displayName", - "grantControls", "state" ], "inputProperties": { @@ -4217,7 +4296,7 @@ }, "sessionControls": { "$ref": "#/types/azuread:index/ConditionalAccessPolicySessionControls:ConditionalAccessPolicySessionControls", - "description": "A `session_controls` block as documented below, which specifies the session controls that are enforced after sign-in.\n" + "description": "A `session_controls` block as documented below, which specifies the session controls that are enforced after sign-in.\n\n\u003e Note: At least one of `grant_controls` and/or `session_controls` blocks must be specified.\n" }, "state": { "type": "string", @@ -4227,7 +4306,6 @@ "requiredInputs": [ "conditions", "displayName", - "grantControls", "state" ], "stateInputs": { @@ -4247,7 +4325,7 @@ }, "sessionControls": { "$ref": "#/types/azuread:index/ConditionalAccessPolicySessionControls:ConditionalAccessPolicySessionControls", - "description": "A `session_controls` block as documented below, which specifies the session controls that are enforced after sign-in.\n" + "description": "A `session_controls` block as documented below, which specifies the session controls that are enforced after sign-in.\n\n\u003e Note: At least one of `grant_controls` and/or `session_controls` blocks must be specified.\n" }, "state": { "type": "string", @@ -7602,6 +7680,38 @@ ] } }, + "azuread:index/getDirectoryRoleTemplates:getDirectoryRoleTemplates": { + "description": "Use this data source to access information about directory role templates within Azure Active Directory.\n\n## API Permissions\n\nThe following API permissions are required in order to use this resource.\n\nWhen authenticated with a service principal, this resource requires one of the following application roles: `RoleManagement.Read.Directory` or `Directory.Read.All`\n\nWhen authenticated with a user principal, this data source does not require any additional roles.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azuread from \"@pulumi/azuread\";\n\nconst current = azuread.getDirectoryRoleTemplates({});\nexport const roles = current.then(current =\u003e current.objectIds);\n```\n```python\nimport pulumi\nimport pulumi_azuread as azuread\n\ncurrent = azuread.get_directory_role_templates()\npulumi.export(\"roles\", current.object_ids)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureAD = Pulumi.AzureAD;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = AzureAD.GetDirectoryRoleTemplates.Invoke();\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"roles\"] = current.Apply(getDirectoryRoleTemplatesResult =\u003e getDirectoryRoleTemplatesResult.ObjectIds),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := azuread.GetDirectoryRoleTemplates(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"roles\", current.ObjectIds)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azuread.AzureadFunctions;\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 final var current = AzureadFunctions.getDirectoryRoleTemplates();\n\n ctx.export(\"roles\", current.applyValue(getDirectoryRoleTemplatesResult -\u003e getDirectoryRoleTemplatesResult.objectIds()));\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: azuread:getDirectoryRoleTemplates\n Arguments: {}\noutputs:\n roles: ${current.objectIds}\n```\n{{% /example %}}\n{{% /examples %}}", + "outputs": { + "description": "A collection of values returned by getDirectoryRoleTemplates.\n", + "properties": { + "id": { + "type": "string", + "description": "The provider-assigned unique ID for this managed resource.\n" + }, + "objectIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The object IDs of the role templates.\n" + }, + "roleTemplates": { + "type": "array", + "items": { + "$ref": "#/types/azuread:index/getDirectoryRoleTemplatesRoleTemplate:getDirectoryRoleTemplatesRoleTemplate" + }, + "description": "A list of role templates. Each `role_template` object provides the attributes documented below.\n" + } + }, + "type": "object", + "required": [ + "objectIds", + "roleTemplates", + "id" + ] + } + }, "azuread:index/getDirectoryRoles:getDirectoryRoles": { "description": "Use this data source to access information about activated directory roles within Azure Active Directory.\n\n## API Permissions\n\nThe following API permissions are required in order to use this resource.\n\nWhen authenticated with a service principal, this resource requires one of the following application roles: `RoleManagement.Read.Directory` or `Directory.Read.All`\n\nWhen authenticated with a user principal, this data source does not require any additional roles.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azuread from \"@pulumi/azuread\";\n\nconst current = azuread.getDirectoryRoles({});\nexport const roles = current.then(current =\u003e current.objectIds);\n```\n```python\nimport pulumi\nimport pulumi_azuread as azuread\n\ncurrent = azuread.get_directory_roles()\npulumi.export(\"roles\", current.object_ids)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureAD = Pulumi.AzureAD;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var current = AzureAD.GetDirectoryRoles.Invoke();\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"roles\"] = current.Apply(getDirectoryRolesResult =\u003e getDirectoryRolesResult.ObjectIds),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcurrent, err := azuread.GetDirectoryRoles(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"roles\", current.ObjectIds)\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azuread.AzureadFunctions;\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 final var current = AzureadFunctions.getDirectoryRoles();\n\n ctx.export(\"roles\", current.applyValue(getDirectoryRolesResult -\u003e getDirectoryRolesResult.objectIds()));\n }\n}\n```\n```yaml\nvariables:\n current:\n fn::invoke:\n Function: azuread:getDirectoryRoles\n Arguments: {}\noutputs:\n roles: ${current.objectIds}\n```\n{{% /example %}}\n{{% /examples %}}", "outputs": { @@ -8015,6 +8125,53 @@ ] } }, + "azuread:index/getNamedLocation:getNamedLocation": { + "description": "Gets information about a Named Location within Azure Active Directory.\n\n## API Permissions\n\nThe following API permissions are required in order to use this data source.\n\nWhen authenticated with a service principal, this resource requires the following application roles: `Policy.Read.All`\n\nWhen authenticated with a user principal, this resource requires one of the following directory roles: `Conditional Access Administrator` or `Global Reader`\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azuread from \"@pulumi/azuread\";\n\nconst example = azuread.getNamedLocation({\n displayName: \"My Named Location\",\n});\n```\n```python\nimport pulumi\nimport pulumi_azuread as azuread\n\nexample = azuread.get_named_location(display_name=\"My Named Location\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureAD = Pulumi.AzureAD;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = AzureAD.GetNamedLocation.Invoke(new()\n {\n DisplayName = \"My Named Location\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread\"\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 := azuread.LookupNamedLocation(ctx, \u0026azuread.LookupNamedLocationArgs{\n\t\t\tDisplayName: \"My Named Location\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azuread.AzureadFunctions;\nimport com.pulumi.azuread.inputs.GetNamedLocationArgs;\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 final var example = AzureadFunctions.getNamedLocation(GetNamedLocationArgs.builder()\n .displayName(\"My Named Location\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: azuread:getNamedLocation\n Arguments:\n displayName: My Named Location\n```\n{{% /example %}}\n{{% /examples %}}\n## Attributes Reference \n\nThe following attributes are exported:\n\n* `country` - A `country` block as documented below, which describes a country-based named location.\n* `id` - The ID of the named location.\n* `ip` - An `ip` block as documented below, which describes an IP-based named location.\n* \n---\n\n`country` block exports the following:\n\n* `countries_and_regions` - List of countries and/or regions in two-letter format specified by ISO 3166-2.\n* `include_unknown_countries_and_regions` - Whether IP addresses that don't map to a country or region are included in the named location.\n\n---\n\n`ip` block exports the following:\n\n* `ip_ranges` - List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596.\n* `trusted` - Whether the named location is trusted.\n", + "inputs": { + "description": "A collection of arguments for invoking getNamedLocation.\n", + "properties": { + "displayName": { + "type": "string", + "description": "Specifies the display named of the named location to look up.\n" + } + }, + "type": "object", + "required": [ + "displayName" + ] + }, + "outputs": { + "description": "A collection of values returned by getNamedLocation.\n", + "properties": { + "countries": { + "type": "array", + "items": { + "$ref": "#/types/azuread:index/getNamedLocationCountry:getNamedLocationCountry" + } + }, + "displayName": { + "type": "string" + }, + "id": { + "type": "string", + "description": "The provider-assigned unique ID for this managed resource.\n" + }, + "ips": { + "type": "array", + "items": { + "$ref": "#/types/azuread:index/getNamedLocationIp:getNamedLocationIp" + } + } + }, + "type": "object", + "required": [ + "countries", + "displayName", + "ips", + "id" + ] + } + }, "azuread:index/getServicePrincipal:getServicePrincipal": { "description": "Gets information about an existing service principal associated with an application within Azure Active Directory.\n\n## API Permissions\n\nThe following API permissions are required in order to use this data source.\n\nWhen authenticated with a service principal, this data source requires one of the following application roles: `Application.Read.All` or `Directory.Read.All`\n\nWhen authenticated with a user principal, this data source does not require any additional roles.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n*Look up by application display name*\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azuread from \"@pulumi/azuread\";\n\nconst example = azuread.getServicePrincipal({\n displayName: \"my-awesome-application\",\n});\n```\n```python\nimport pulumi\nimport pulumi_azuread as azuread\n\nexample = azuread.get_service_principal(display_name=\"my-awesome-application\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureAD = Pulumi.AzureAD;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = AzureAD.GetServicePrincipal.Invoke(new()\n {\n DisplayName = \"my-awesome-application\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread\"\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 := azuread.LookupServicePrincipal(ctx, \u0026azuread.LookupServicePrincipalArgs{\n\t\t\tDisplayName: pulumi.StringRef(\"my-awesome-application\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azuread.AzureadFunctions;\nimport com.pulumi.azuread.inputs.GetServicePrincipalArgs;\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 final var example = AzureadFunctions.getServicePrincipal(GetServicePrincipalArgs.builder()\n .displayName(\"my-awesome-application\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: azuread:getServicePrincipal\n Arguments:\n displayName: my-awesome-application\n```\n\n*Look up by application ID (client ID)*\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azuread from \"@pulumi/azuread\";\n\nconst example = azuread.getServicePrincipal({\n applicationId: \"00000000-0000-0000-0000-000000000000\",\n});\n```\n```python\nimport pulumi\nimport pulumi_azuread as azuread\n\nexample = azuread.get_service_principal(application_id=\"00000000-0000-0000-0000-000000000000\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureAD = Pulumi.AzureAD;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = AzureAD.GetServicePrincipal.Invoke(new()\n {\n ApplicationId = \"00000000-0000-0000-0000-000000000000\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread\"\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 := azuread.LookupServicePrincipal(ctx, \u0026azuread.LookupServicePrincipalArgs{\n\t\t\tApplicationId: pulumi.StringRef(\"00000000-0000-0000-0000-000000000000\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azuread.AzureadFunctions;\nimport com.pulumi.azuread.inputs.GetServicePrincipalArgs;\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 final var example = AzureadFunctions.getServicePrincipal(GetServicePrincipalArgs.builder()\n .applicationId(\"00000000-0000-0000-0000-000000000000\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: azuread:getServicePrincipal\n Arguments:\n applicationId: 00000000-0000-0000-0000-000000000000\n```\n\n*Look up by service principal object ID*\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azuread from \"@pulumi/azuread\";\n\nconst example = azuread.getServicePrincipal({\n objectId: \"00000000-0000-0000-0000-000000000000\",\n});\n```\n```python\nimport pulumi\nimport pulumi_azuread as azuread\n\nexample = azuread.get_service_principal(object_id=\"00000000-0000-0000-0000-000000000000\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureAD = Pulumi.AzureAD;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = AzureAD.GetServicePrincipal.Invoke(new()\n {\n ObjectId = \"00000000-0000-0000-0000-000000000000\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread\"\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 := azuread.LookupServicePrincipal(ctx, \u0026azuread.LookupServicePrincipalArgs{\n\t\t\tObjectId: pulumi.StringRef(\"00000000-0000-0000-0000-000000000000\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azuread.AzureadFunctions;\nimport com.pulumi.azuread.inputs.GetServicePrincipalArgs;\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 final var example = AzureadFunctions.getServicePrincipal(GetServicePrincipalArgs.builder()\n .objectId(\"00000000-0000-0000-0000-000000000000\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: azuread:getServicePrincipal\n Arguments:\n objectId: 00000000-0000-0000-0000-000000000000\n```\n{{% /example %}}\n{{% /examples %}}", "inputs": { diff --git a/provider/go.mod b/provider/go.mod index c634c0d29..a9cb06ae0 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -5,8 +5,8 @@ go 1.19 require ( github.com/hashicorp/go-azure-sdk v0.20230511.1094507 github.com/hashicorp/terraform-provider-azuread/shim v0.0.0 - github.com/pulumi/pulumi-terraform-bridge/v3 v3.53.0 - github.com/pulumi/pulumi/sdk/v3 v3.73.1-0.20230623071431-db579129f4c9 + github.com/pulumi/pulumi-terraform-bridge/v3 v3.54.2 + github.com/pulumi/pulumi/sdk/v3 v3.75.0 ) replace ( @@ -140,7 +140,7 @@ require ( github.com/hashicorp/terraform-plugin-go v0.16.0 // indirect github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 // indirect - github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20230714014117-c3f4885eda69 // indirect + github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20230727144955-0adfe586f500 // indirect github.com/hashicorp/terraform-registry-address v0.2.1 // indirect github.com/hashicorp/terraform-svchost v0.1.1 // indirect github.com/hashicorp/vault/api v1.8.2 // indirect @@ -158,7 +158,7 @@ require ( github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/klauspost/compress v1.15.11 // indirect github.com/kylelemons/godebug v1.1.0 // indirect - github.com/manicminer/hamilton v0.62.0 // indirect + github.com/manicminer/hamilton v0.63.0 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.16 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect @@ -190,7 +190,7 @@ require ( github.com/pulumi/pulumi-java/pkg v0.9.4 // indirect github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.4 // indirect github.com/pulumi/pulumi-yaml v1.1.1 // indirect - github.com/pulumi/pulumi/pkg/v3 v3.73.1-0.20230623071431-db579129f4c9 // indirect + github.com/pulumi/pulumi/pkg/v3 v3.75.0 // indirect github.com/pulumi/schema-tools v0.1.2 // indirect github.com/pulumi/terraform-diff-reader v0.0.2 // indirect github.com/rivo/uniseg v0.4.4 // indirect @@ -239,7 +239,7 @@ require ( google.golang.org/api v0.114.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect - google.golang.org/grpc v1.56.0 // indirect + google.golang.org/grpc v1.56.1 // indirect google.golang.org/protobuf v1.30.0 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect diff --git a/provider/go.sum b/provider/go.sum index bcd02528b..2d9bc57de 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -1651,8 +1651,8 @@ github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwU github.com/hashicorp/terraform-plugin-sdk v1.7.0 h1:B//oq0ZORG+EkVrIJy0uPGSonvmXqxSzXe8+GhknoW0= github.com/hashicorp/terraform-plugin-sdk v1.7.0/go.mod h1:OjgQmey5VxnPej/buEhe+YqKm0KNvV3QqU4hkqHqPCY= github.com/hashicorp/terraform-plugin-test v1.2.0/go.mod h1:QIJHYz8j+xJtdtLrFTlzQVC0ocr3rf/OjIpgZLK56Hs= -github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20230714014117-c3f4885eda69 h1:Otx9uxPOPP0A5ItvDAjMjwbwizDC+EKmJ3IGBdLJiGk= -github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20230714014117-c3f4885eda69/go.mod h1:xu61NBBpb7JnKfSjnX2vib0ZlqfACCEwXBO/0/+BEQ4= +github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20230727144955-0adfe586f500 h1:m/KNRCXHZjsZjhB2IWMa3aKMYUsWHOxMBUaU13UmYBU= +github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20230727144955-0adfe586f500/go.mod h1:FPBStSHIBUhggh9nR401e++98vmPhz3Q3ROmZmUR6FM= github.com/hashicorp/terraform-registry-address v0.0.0-20220623143253-7d51757b572c/go.mod h1:Wn3Na71knbXc1G8Lh+yu/dQWWJeFQEpDeJMtWMtlmNI= github.com/hashicorp/terraform-registry-address v0.2.1 h1:QuTf6oJ1+WSflJw6WYOHhLgwUiQ0FrROpHPYFtwTYWM= github.com/hashicorp/terraform-registry-address v0.2.1/go.mod h1:BSE9fIFzp0qWsJUUyGquo4ldV9k2n+psif6NYkBRS3Y= @@ -1677,7 +1677,7 @@ github.com/hexops/autogold v1.3.0 h1:IEtGNPxBeBu8RMn8eKWh/Ll9dVNgSnJ7bp/qHgMQ14o github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/valast v1.4.0 h1:sFzyxPDP0riFQUzSBXTCCrAbbIndHPWMndxuEjXdZlc= github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A= -github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog= +github.com/hinshun/vt10x v0.0.0-20220301184237-5011da428d02 h1:AgcIVYPa6XJnU3phs104wLj8l5GEththEw6+F79YsIY= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= @@ -1844,8 +1844,8 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/manicminer/hamilton v0.62.0 h1:auy910L0VntDUDHMG6K6e6jr5QUk3OHSldt13NHztwY= -github.com/manicminer/hamilton v0.62.0/go.mod h1:va/X2sztcgQ5+BSxc2eU3FTHYIyxLnHvB4LudlPUZdE= +github.com/manicminer/hamilton v0.63.0 h1:Pxh+TvuRhGsKl29v3dnzAoNJYUwqn6SNp/TGddg3g7E= +github.com/manicminer/hamilton v0.63.0/go.mod h1:va/X2sztcgQ5+BSxc2eU3FTHYIyxLnHvB4LudlPUZdE= github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= @@ -2152,16 +2152,16 @@ github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40T github.com/pulumi/pulumi-java/pkg v0.9.4 h1:gIQZmlUI1o9ye8CL2XFqtmAX6Lwr9uj/+HzjboiSmK4= github.com/pulumi/pulumi-java/pkg v0.9.4/go.mod h1:c6rSw/+q4O0IImgJ9axxoC6QesbPYWBaG5gimbHouUQ= github.com/pulumi/pulumi-terraform-bridge/testing v0.0.1 h1:SCg1gjfY9N4yn8U8peIUYATifjoDABkyR7H9lmefsfc= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.53.0 h1:XP754+36CpyiT5tEzqd43U8gYGqDML9hkiWMaoV0WG0= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.53.0/go.mod h1:Bm1kuEs0xouFxEG2Lv/I3OhnME+VId9DbkRClnwFqsI= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.54.2 h1:ur1BqYZKadvCnqAeuPzTwJSfHBnDIRopX37ewRPPdPo= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.54.2/go.mod h1:OgOp9PzeKBBqWRZ87VX+amwG8Jt1V1pI+/WZ5dGkYG8= github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.4 h1:rIzMmtcVpPX8ynaz6/nW5AHNY63DiNfCohqmxWvMpM4= github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.4/go.mod h1:Kt8RIZWa/N8rW3+0g6NrqCBmF3o+HuIhFaZpssEkG6w= github.com/pulumi/pulumi-yaml v1.1.1 h1:8pyBNIU8+ym0wYpjhsCqN+cutygfK1XbhY2YEeNfyXY= github.com/pulumi/pulumi-yaml v1.1.1/go.mod h1:GhpdS6rFpwqvUtKdA+fQy8P28iNvncng39IXh5q68vE= -github.com/pulumi/pulumi/pkg/v3 v3.73.1-0.20230623071431-db579129f4c9 h1:kZqHt7gZIhBxzE2N+WuyI6Z9nN/YnR6x1mNie3Wldvw= -github.com/pulumi/pulumi/pkg/v3 v3.73.1-0.20230623071431-db579129f4c9/go.mod h1:uioQQOTP9OUSIDga3MuDVnR3OThhWjByoe1M38VxhwI= -github.com/pulumi/pulumi/sdk/v3 v3.73.1-0.20230623071431-db579129f4c9 h1:w/8QHBnDZz8d+aHhBSjyuH7G67LkFgY3xVtAkbE2OII= -github.com/pulumi/pulumi/sdk/v3 v3.73.1-0.20230623071431-db579129f4c9/go.mod h1:BUUBfQZsH0FPuznRfFHkR+b96VlXELnn+DgidFj4XSQ= +github.com/pulumi/pulumi/pkg/v3 v3.75.0 h1:oBJ+Ft5VokKJGZHtX5ytyKenMCBH/d1+rsVL5MOGmHo= +github.com/pulumi/pulumi/pkg/v3 v3.75.0/go.mod h1:jzU1sKjOoDMFxxISb4hEK/C1mQsHVheYkWfZPLQRC9c= +github.com/pulumi/pulumi/sdk/v3 v3.75.0 h1:+5V5UOwgHKAaqSD8DKhuTU+RTObqkH3yp/p2EJQYYQk= +github.com/pulumi/pulumi/sdk/v3 v3.75.0/go.mod h1:HiE9Wf+DVrg8Em1D6bxRCdDMsNkj8//vLCST73xH2Hc= github.com/pulumi/schema-tools v0.1.2 h1:Fd9xvUjgck4NA+7/jSk7InqCUT4Kj940+EcnbQKpfZo= github.com/pulumi/schema-tools v0.1.2/go.mod h1:62lgj52Tzq11eqWTIaKd+EVyYAu5dEcDJxMhTjvMO/k= github.com/pulumi/terraform-diff-reader v0.0.2 h1:kTE4nEXU3/SYXESvAIem+wyHMI3abqkI3OhJ0G04LLI= @@ -3358,8 +3358,9 @@ google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsA google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= -google.golang.org/grpc v1.56.0 h1:+y7Bs8rtMd07LeXmL3NxcTLn7mUkbKZqEpPhMNkwJEE= google.golang.org/grpc v1.56.0/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/grpc v1.56.1 h1:z0dNfjIl0VpaZ9iSVjA6daGatAYwPGstTjt5vkRMFkQ= +google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0/go.mod h1:DNq5QpG7LJqD2AamLZ7zvKE0DEpVl2BSEVjFycAAjRY= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/provider/shim/go.mod b/provider/shim/go.mod index 448e4524d..a1faf3917 100644 --- a/provider/shim/go.mod +++ b/provider/shim/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 - github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20230714014117-c3f4885eda69 + github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20230727144955-0adfe586f500 ) require ( @@ -37,7 +37,7 @@ require ( github.com/hashicorp/terraform-registry-address v0.1.0 // indirect github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 // indirect - github.com/manicminer/hamilton v0.62.0 // indirect + github.com/manicminer/hamilton v0.63.0 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect diff --git a/provider/shim/go.sum b/provider/shim/go.sum index f45c4a013..430c21936 100644 --- a/provider/shim/go.sum +++ b/provider/shim/go.sum @@ -171,8 +171,8 @@ github.com/hashicorp/terraform-plugin-go v0.14.3/go.mod h1:7ees7DMZ263q8wQ6E4RdI github.com/hashicorp/terraform-plugin-log v0.7.0/go.mod h1:p4R1jWBXRTvL4odmEkFfDdhUjHf9zcs/BCoNHAc7IK4= github.com/hashicorp/terraform-plugin-log v0.8.0 h1:pX2VQ/TGKu+UU1rCay0OlzosNKe4Nz1pepLXj95oyy0= github.com/hashicorp/terraform-plugin-log v0.8.0/go.mod h1:1myFrhVsBLeylQzYYEV17VVjtG8oYPRFdaZs7xdW2xs= -github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20230714014117-c3f4885eda69 h1:Otx9uxPOPP0A5ItvDAjMjwbwizDC+EKmJ3IGBdLJiGk= -github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20230714014117-c3f4885eda69/go.mod h1:xu61NBBpb7JnKfSjnX2vib0ZlqfACCEwXBO/0/+BEQ4= +github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20230727144955-0adfe586f500 h1:m/KNRCXHZjsZjhB2IWMa3aKMYUsWHOxMBUaU13UmYBU= +github.com/hashicorp/terraform-provider-azuread v1.6.1-0.20230727144955-0adfe586f500/go.mod h1:FPBStSHIBUhggh9nR401e++98vmPhz3Q3ROmZmUR6FM= github.com/hashicorp/terraform-registry-address v0.0.0-20220623143253-7d51757b572c/go.mod h1:Wn3Na71knbXc1G8Lh+yu/dQWWJeFQEpDeJMtWMtlmNI= github.com/hashicorp/terraform-registry-address v0.1.0 h1:W6JkV9wbum+m516rCl5/NjKxCyTVaaUBbzYcMzBDO3U= github.com/hashicorp/terraform-registry-address v0.1.0/go.mod h1:EnyO2jYO6j29DTHbJcm00E5nQTFeTtyZH3H5ycydQ5A= @@ -205,8 +205,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/manicminer/hamilton v0.62.0 h1:auy910L0VntDUDHMG6K6e6jr5QUk3OHSldt13NHztwY= -github.com/manicminer/hamilton v0.62.0/go.mod h1:va/X2sztcgQ5+BSxc2eU3FTHYIyxLnHvB4LudlPUZdE= +github.com/manicminer/hamilton v0.63.0 h1:Pxh+TvuRhGsKl29v3dnzAoNJYUwqn6SNp/TGddg3g7E= +github.com/manicminer/hamilton v0.63.0/go.mod h1:va/X2sztcgQ5+BSxc2eU3FTHYIyxLnHvB4LudlPUZdE= github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= diff --git a/sdk/dotnet/ConditionalAccessPolicy.cs b/sdk/dotnet/ConditionalAccessPolicy.cs index 782ca7a40..b7610192f 100644 --- a/sdk/dotnet/ConditionalAccessPolicy.cs +++ b/sdk/dotnet/ConditionalAccessPolicy.cs @@ -266,10 +266,12 @@ public partial class ConditionalAccessPolicy : global::Pulumi.CustomResource /// A `grant_controls` block as documented below, which specifies the grant controls that must be fulfilled to pass the policy. /// [Output("grantControls")] - public Output GrantControls { get; private set; } = null!; + public Output GrantControls { get; private set; } = null!; /// /// A `session_controls` block as documented below, which specifies the session controls that are enforced after sign-in. + /// + /// > Note: At least one of `grant_controls` and/or `session_controls` blocks must be specified. /// [Output("sessionControls")] public Output SessionControls { get; private set; } = null!; @@ -341,11 +343,13 @@ public sealed class ConditionalAccessPolicyArgs : global::Pulumi.ResourceArgs /// /// A `grant_controls` block as documented below, which specifies the grant controls that must be fulfilled to pass the policy. /// - [Input("grantControls", required: true)] - public Input GrantControls { get; set; } = null!; + [Input("grantControls")] + public Input? GrantControls { get; set; } /// /// A `session_controls` block as documented below, which specifies the session controls that are enforced after sign-in. + /// + /// > Note: At least one of `grant_controls` and/or `session_controls` blocks must be specified. /// [Input("sessionControls")] public Input? SessionControls { get; set; } @@ -384,6 +388,8 @@ public sealed class ConditionalAccessPolicyState : global::Pulumi.ResourceArgs /// /// A `session_controls` block as documented below, which specifies the session controls that are enforced after sign-in. + /// + /// > Note: At least one of `grant_controls` and/or `session_controls` blocks must be specified. /// [Input("sessionControls")] public Input? SessionControls { get; set; } diff --git a/sdk/dotnet/GetDirectoryRoleTemplates.cs b/sdk/dotnet/GetDirectoryRoleTemplates.cs new file mode 100644 index 000000000..aff0bdeb4 --- /dev/null +++ b/sdk/dotnet/GetDirectoryRoleTemplates.cs @@ -0,0 +1,82 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** 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.AzureAD +{ + public static class GetDirectoryRoleTemplates + { + /// + /// Use this data source to access information about directory role templates within Azure Active Directory. + /// + /// ## API Permissions + /// + /// The following API permissions are required in order to use this resource. + /// + /// When authenticated with a service principal, this resource requires one of the following application roles: `RoleManagement.Read.Directory` or `Directory.Read.All` + /// + /// When authenticated with a user principal, this data source does not require any additional roles. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using AzureAD = Pulumi.AzureAD; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var current = AzureAD.GetDirectoryRoleTemplates.Invoke(); + /// + /// return new Dictionary<string, object?> + /// { + /// ["roles"] = current.Apply(getDirectoryRoleTemplatesResult => getDirectoryRoleTemplatesResult.ObjectIds), + /// }; + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} + /// + public static Task InvokeAsync(InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.InvokeAsync("azuread:index/getDirectoryRoleTemplates:getDirectoryRoleTemplates", InvokeArgs.Empty, options.WithDefaults()); + } + + + [OutputType] + public sealed class GetDirectoryRoleTemplatesResult + { + /// + /// The provider-assigned unique ID for this managed resource. + /// + public readonly string Id; + /// + /// The object IDs of the role templates. + /// + public readonly ImmutableArray ObjectIds; + /// + /// A list of role templates. Each `role_template` object provides the attributes documented below. + /// + public readonly ImmutableArray RoleTemplates; + + [OutputConstructor] + private GetDirectoryRoleTemplatesResult( + string id, + + ImmutableArray objectIds, + + ImmutableArray roleTemplates) + { + Id = id; + ObjectIds = objectIds; + RoleTemplates = roleTemplates; + } + } +} diff --git a/sdk/dotnet/GetNamedLocation.cs b/sdk/dotnet/GetNamedLocation.cs new file mode 100644 index 000000000..8037dd991 --- /dev/null +++ b/sdk/dotnet/GetNamedLocation.cs @@ -0,0 +1,186 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** 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.AzureAD +{ + public static class GetNamedLocation + { + /// + /// Gets information about a Named Location within Azure Active Directory. + /// + /// ## API Permissions + /// + /// The following API permissions are required in order to use this data source. + /// + /// When authenticated with a service principal, this resource requires the following application roles: `Policy.Read.All` + /// + /// When authenticated with a user principal, this resource requires one of the following directory roles: `Conditional Access Administrator` or `Global Reader` + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using AzureAD = Pulumi.AzureAD; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = AzureAD.GetNamedLocation.Invoke(new() + /// { + /// DisplayName = "My Named Location", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} + /// ## Attributes Reference + /// + /// The following attributes are exported: + /// + /// * `country` - A `country` block as documented below, which describes a country-based named location. + /// * `id` - The ID of the named location. + /// * `ip` - An `ip` block as documented below, which describes an IP-based named location. + /// * + /// --- + /// + /// `country` block exports the following: + /// + /// * `countries_and_regions` - List of countries and/or regions in two-letter format specified by ISO 3166-2. + /// * `include_unknown_countries_and_regions` - Whether IP addresses that don't map to a country or region are included in the named location. + /// + /// --- + /// + /// `ip` block exports the following: + /// + /// * `ip_ranges` - List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. + /// * `trusted` - Whether the named location is trusted. + /// + public static Task InvokeAsync(GetNamedLocationArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.InvokeAsync("azuread:index/getNamedLocation:getNamedLocation", args ?? new GetNamedLocationArgs(), options.WithDefaults()); + + /// + /// Gets information about a Named Location within Azure Active Directory. + /// + /// ## API Permissions + /// + /// The following API permissions are required in order to use this data source. + /// + /// When authenticated with a service principal, this resource requires the following application roles: `Policy.Read.All` + /// + /// When authenticated with a user principal, this resource requires one of the following directory roles: `Conditional Access Administrator` or `Global Reader` + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using AzureAD = Pulumi.AzureAD; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var example = AzureAD.GetNamedLocation.Invoke(new() + /// { + /// DisplayName = "My Named Location", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} + /// ## Attributes Reference + /// + /// The following attributes are exported: + /// + /// * `country` - A `country` block as documented below, which describes a country-based named location. + /// * `id` - The ID of the named location. + /// * `ip` - An `ip` block as documented below, which describes an IP-based named location. + /// * + /// --- + /// + /// `country` block exports the following: + /// + /// * `countries_and_regions` - List of countries and/or regions in two-letter format specified by ISO 3166-2. + /// * `include_unknown_countries_and_regions` - Whether IP addresses that don't map to a country or region are included in the named location. + /// + /// --- + /// + /// `ip` block exports the following: + /// + /// * `ip_ranges` - List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. + /// * `trusted` - Whether the named location is trusted. + /// + public static Output Invoke(GetNamedLocationInvokeArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.Invoke("azuread:index/getNamedLocation:getNamedLocation", args ?? new GetNamedLocationInvokeArgs(), options.WithDefaults()); + } + + + public sealed class GetNamedLocationArgs : global::Pulumi.InvokeArgs + { + /// + /// Specifies the display named of the named location to look up. + /// + [Input("displayName", required: true)] + public string DisplayName { get; set; } = null!; + + public GetNamedLocationArgs() + { + } + public static new GetNamedLocationArgs Empty => new GetNamedLocationArgs(); + } + + public sealed class GetNamedLocationInvokeArgs : global::Pulumi.InvokeArgs + { + /// + /// Specifies the display named of the named location to look up. + /// + [Input("displayName", required: true)] + public Input DisplayName { get; set; } = null!; + + public GetNamedLocationInvokeArgs() + { + } + public static new GetNamedLocationInvokeArgs Empty => new GetNamedLocationInvokeArgs(); + } + + + [OutputType] + public sealed class GetNamedLocationResult + { + public readonly ImmutableArray Countries; + public readonly string DisplayName; + /// + /// The provider-assigned unique ID for this managed resource. + /// + public readonly string Id; + public readonly ImmutableArray Ips; + + [OutputConstructor] + private GetNamedLocationResult( + ImmutableArray countries, + + string displayName, + + string id, + + ImmutableArray ips) + { + Countries = countries; + DisplayName = displayName; + Id = id; + Ips = ips; + } + } +} diff --git a/sdk/dotnet/Inputs/AccessPackageAssignmentPolicyAssignmentReviewSettingsArgs.cs b/sdk/dotnet/Inputs/AccessPackageAssignmentPolicyAssignmentReviewSettingsArgs.cs index 368f61b50..3eef7256d 100644 --- a/sdk/dotnet/Inputs/AccessPackageAssignmentPolicyAssignmentReviewSettingsArgs.cs +++ b/sdk/dotnet/Inputs/AccessPackageAssignmentPolicyAssignmentReviewSettingsArgs.cs @@ -49,7 +49,7 @@ public sealed class AccessPackageAssignmentPolicyAssignmentReviewSettingsArgs : public Input? ReviewFrequency { get; set; } /// - /// Self review or specific reviewers. Valid values are `Self`, or `Reviewers`. + /// Self-review or specific reviewers. Valid values are `Manager`, `Reviewers`, or `Self`. /// [Input("reviewType")] public Input? ReviewType { get; set; } diff --git a/sdk/dotnet/Inputs/AccessPackageAssignmentPolicyAssignmentReviewSettingsGetArgs.cs b/sdk/dotnet/Inputs/AccessPackageAssignmentPolicyAssignmentReviewSettingsGetArgs.cs index 393e5bf93..cb1d5eac7 100644 --- a/sdk/dotnet/Inputs/AccessPackageAssignmentPolicyAssignmentReviewSettingsGetArgs.cs +++ b/sdk/dotnet/Inputs/AccessPackageAssignmentPolicyAssignmentReviewSettingsGetArgs.cs @@ -49,7 +49,7 @@ public sealed class AccessPackageAssignmentPolicyAssignmentReviewSettingsGetArgs public Input? ReviewFrequency { get; set; } /// - /// Self review or specific reviewers. Valid values are `Self`, or `Reviewers`. + /// Self-review or specific reviewers. Valid values are `Manager`, `Reviewers`, or `Self`. /// [Input("reviewType")] public Input? ReviewType { get; set; } diff --git a/sdk/dotnet/Inputs/ConditionalAccessPolicyConditionsArgs.cs b/sdk/dotnet/Inputs/ConditionalAccessPolicyConditionsArgs.cs index 1d36051c5..6068e5b46 100644 --- a/sdk/dotnet/Inputs/ConditionalAccessPolicyConditionsArgs.cs +++ b/sdk/dotnet/Inputs/ConditionalAccessPolicyConditionsArgs.cs @@ -54,11 +54,23 @@ public InputList ClientAppTypes [Input("platforms")] public Input? Platforms { get; set; } + [Input("servicePrincipalRiskLevels")] + private InputList? _servicePrincipalRiskLevels; + + /// + /// A list of service principal sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `none`, `unknownFutureValue`. + /// + public InputList ServicePrincipalRiskLevels + { + get => _servicePrincipalRiskLevels ?? (_servicePrincipalRiskLevels = new InputList()); + set => _servicePrincipalRiskLevels = value; + } + [Input("signInRiskLevels")] private InputList? _signInRiskLevels; /// - /// A list of sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. + /// A list of user sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. /// public InputList SignInRiskLevels { diff --git a/sdk/dotnet/Inputs/ConditionalAccessPolicyConditionsGetArgs.cs b/sdk/dotnet/Inputs/ConditionalAccessPolicyConditionsGetArgs.cs index f39e92d86..338ef44ed 100644 --- a/sdk/dotnet/Inputs/ConditionalAccessPolicyConditionsGetArgs.cs +++ b/sdk/dotnet/Inputs/ConditionalAccessPolicyConditionsGetArgs.cs @@ -54,11 +54,23 @@ public InputList ClientAppTypes [Input("platforms")] public Input? Platforms { get; set; } + [Input("servicePrincipalRiskLevels")] + private InputList? _servicePrincipalRiskLevels; + + /// + /// A list of service principal sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `none`, `unknownFutureValue`. + /// + public InputList ServicePrincipalRiskLevels + { + get => _servicePrincipalRiskLevels ?? (_servicePrincipalRiskLevels = new InputList()); + set => _servicePrincipalRiskLevels = value; + } + [Input("signInRiskLevels")] private InputList? _signInRiskLevels; /// - /// A list of sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. + /// A list of user sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. /// public InputList SignInRiskLevels { diff --git a/sdk/dotnet/Inputs/NamedLocationIpArgs.cs b/sdk/dotnet/Inputs/NamedLocationIpArgs.cs index 8cc962fba..327d8f0a8 100644 --- a/sdk/dotnet/Inputs/NamedLocationIpArgs.cs +++ b/sdk/dotnet/Inputs/NamedLocationIpArgs.cs @@ -16,7 +16,7 @@ public sealed class NamedLocationIpArgs : global::Pulumi.ResourceArgs private InputList? _ipRanges; /// - /// List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596. + /// List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. /// public InputList IpRanges { diff --git a/sdk/dotnet/Inputs/NamedLocationIpGetArgs.cs b/sdk/dotnet/Inputs/NamedLocationIpGetArgs.cs index 121b9f14d..ac10683e2 100644 --- a/sdk/dotnet/Inputs/NamedLocationIpGetArgs.cs +++ b/sdk/dotnet/Inputs/NamedLocationIpGetArgs.cs @@ -16,7 +16,7 @@ public sealed class NamedLocationIpGetArgs : global::Pulumi.ResourceArgs private InputList? _ipRanges; /// - /// List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596. + /// List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. /// public InputList IpRanges { diff --git a/sdk/dotnet/Outputs/AccessPackageAssignmentPolicyAssignmentReviewSettings.cs b/sdk/dotnet/Outputs/AccessPackageAssignmentPolicyAssignmentReviewSettings.cs index 9195f801a..2a8e03341 100644 --- a/sdk/dotnet/Outputs/AccessPackageAssignmentPolicyAssignmentReviewSettings.cs +++ b/sdk/dotnet/Outputs/AccessPackageAssignmentPolicyAssignmentReviewSettings.cs @@ -38,7 +38,7 @@ public sealed class AccessPackageAssignmentPolicyAssignmentReviewSettings /// public readonly string? ReviewFrequency; /// - /// Self review or specific reviewers. Valid values are `Self`, or `Reviewers`. + /// Self-review or specific reviewers. Valid values are `Manager`, `Reviewers`, or `Self`. /// public readonly string? ReviewType; /// diff --git a/sdk/dotnet/Outputs/ConditionalAccessPolicyConditions.cs b/sdk/dotnet/Outputs/ConditionalAccessPolicyConditions.cs index 64d8b1a99..67249aff8 100644 --- a/sdk/dotnet/Outputs/ConditionalAccessPolicyConditions.cs +++ b/sdk/dotnet/Outputs/ConditionalAccessPolicyConditions.cs @@ -38,7 +38,11 @@ public sealed class ConditionalAccessPolicyConditions /// public readonly Outputs.ConditionalAccessPolicyConditionsPlatforms? Platforms; /// - /// A list of sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. + /// A list of service principal sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `none`, `unknownFutureValue`. + /// + public readonly ImmutableArray ServicePrincipalRiskLevels; + /// + /// A list of user sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. /// public readonly ImmutableArray SignInRiskLevels; /// @@ -64,6 +68,8 @@ private ConditionalAccessPolicyConditions( Outputs.ConditionalAccessPolicyConditionsPlatforms? platforms, + ImmutableArray servicePrincipalRiskLevels, + ImmutableArray signInRiskLevels, ImmutableArray userRiskLevels, @@ -76,6 +82,7 @@ private ConditionalAccessPolicyConditions( Devices = devices; Locations = locations; Platforms = platforms; + ServicePrincipalRiskLevels = servicePrincipalRiskLevels; SignInRiskLevels = signInRiskLevels; UserRiskLevels = userRiskLevels; Users = users; diff --git a/sdk/dotnet/Outputs/GetDirectoryRoleTemplatesRoleTemplateResult.cs b/sdk/dotnet/Outputs/GetDirectoryRoleTemplatesRoleTemplateResult.cs new file mode 100644 index 000000000..768dfb179 --- /dev/null +++ b/sdk/dotnet/Outputs/GetDirectoryRoleTemplatesRoleTemplateResult.cs @@ -0,0 +1,42 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** 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.AzureAD.Outputs +{ + + [OutputType] + public sealed class GetDirectoryRoleTemplatesRoleTemplateResult + { + /// + /// The description of the directory role template. + /// + public readonly string Description; + /// + /// The display name of the directory role template. + /// + public readonly string DisplayName; + /// + /// The object ID of the directory role template. + /// + public readonly string ObjectId; + + [OutputConstructor] + private GetDirectoryRoleTemplatesRoleTemplateResult( + string description, + + string displayName, + + string objectId) + { + Description = description; + DisplayName = displayName; + ObjectId = objectId; + } + } +} diff --git a/sdk/dotnet/Outputs/GetNamedLocationCountryResult.cs b/sdk/dotnet/Outputs/GetNamedLocationCountryResult.cs new file mode 100644 index 000000000..8b421f93f --- /dev/null +++ b/sdk/dotnet/Outputs/GetNamedLocationCountryResult.cs @@ -0,0 +1,29 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** 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.AzureAD.Outputs +{ + + [OutputType] + public sealed class GetNamedLocationCountryResult + { + public readonly ImmutableArray CountriesAndRegions; + public readonly bool IncludeUnknownCountriesAndRegions; + + [OutputConstructor] + private GetNamedLocationCountryResult( + ImmutableArray countriesAndRegions, + + bool includeUnknownCountriesAndRegions) + { + CountriesAndRegions = countriesAndRegions; + IncludeUnknownCountriesAndRegions = includeUnknownCountriesAndRegions; + } + } +} diff --git a/sdk/dotnet/Outputs/GetNamedLocationIpResult.cs b/sdk/dotnet/Outputs/GetNamedLocationIpResult.cs new file mode 100644 index 000000000..86a1c45f6 --- /dev/null +++ b/sdk/dotnet/Outputs/GetNamedLocationIpResult.cs @@ -0,0 +1,29 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** 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.AzureAD.Outputs +{ + + [OutputType] + public sealed class GetNamedLocationIpResult + { + public readonly ImmutableArray IpRanges; + public readonly bool Trusted; + + [OutputConstructor] + private GetNamedLocationIpResult( + ImmutableArray ipRanges, + + bool trusted) + { + IpRanges = ipRanges; + Trusted = trusted; + } + } +} diff --git a/sdk/dotnet/Outputs/NamedLocationIp.cs b/sdk/dotnet/Outputs/NamedLocationIp.cs index 94bbf1bb5..44c11703f 100644 --- a/sdk/dotnet/Outputs/NamedLocationIp.cs +++ b/sdk/dotnet/Outputs/NamedLocationIp.cs @@ -14,7 +14,7 @@ namespace Pulumi.AzureAD.Outputs public sealed class NamedLocationIp { /// - /// List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596. + /// List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. /// public readonly ImmutableArray IpRanges; /// diff --git a/sdk/go/azuread/accessPackage.go b/sdk/go/azuread/accessPackage.go index 412e1a818..c7802d681 100644 --- a/sdk/go/azuread/accessPackage.go +++ b/sdk/go/azuread/accessPackage.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -94,6 +95,7 @@ func NewAccessPackage(ctx *pulumi.Context, if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource AccessPackage err := ctx.RegisterResource("azuread:index/accessPackage:AccessPackage", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/accessPackageAssignmentPolicy.go b/sdk/go/azuread/accessPackageAssignmentPolicy.go index 4858c8e85..2309016ca 100644 --- a/sdk/go/azuread/accessPackageAssignmentPolicy.go +++ b/sdk/go/azuread/accessPackageAssignmentPolicy.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -153,6 +154,7 @@ func NewAccessPackageAssignmentPolicy(ctx *pulumi.Context, if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource AccessPackageAssignmentPolicy err := ctx.RegisterResource("azuread:index/accessPackageAssignmentPolicy:AccessPackageAssignmentPolicy", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/accessPackageCatalog.go b/sdk/go/azuread/accessPackageCatalog.go index a57e12bed..c52b207cc 100644 --- a/sdk/go/azuread/accessPackageCatalog.go +++ b/sdk/go/azuread/accessPackageCatalog.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -83,6 +84,7 @@ func NewAccessPackageCatalog(ctx *pulumi.Context, if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource AccessPackageCatalog err := ctx.RegisterResource("azuread:index/accessPackageCatalog:AccessPackageCatalog", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/accessPackageCatalogRoleAssignment.go b/sdk/go/azuread/accessPackageCatalogRoleAssignment.go index 76550f9f8..768635797 100644 --- a/sdk/go/azuread/accessPackageCatalogRoleAssignment.go +++ b/sdk/go/azuread/accessPackageCatalogRoleAssignment.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -104,6 +105,7 @@ func NewAccessPackageCatalogRoleAssignment(ctx *pulumi.Context, if args.RoleId == nil { return nil, errors.New("invalid value for required argument 'RoleId'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource AccessPackageCatalogRoleAssignment err := ctx.RegisterResource("azuread:index/accessPackageCatalogRoleAssignment:AccessPackageCatalogRoleAssignment", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/accessPackageResourceCatalogAssociation.go b/sdk/go/azuread/accessPackageResourceCatalogAssociation.go index 132e4f2be..b96db339c 100644 --- a/sdk/go/azuread/accessPackageResourceCatalogAssociation.go +++ b/sdk/go/azuread/accessPackageResourceCatalogAssociation.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -101,6 +102,7 @@ func NewAccessPackageResourceCatalogAssociation(ctx *pulumi.Context, if args.ResourceOriginSystem == nil { return nil, errors.New("invalid value for required argument 'ResourceOriginSystem'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource AccessPackageResourceCatalogAssociation err := ctx.RegisterResource("azuread:index/accessPackageResourceCatalogAssociation:AccessPackageResourceCatalogAssociation", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/accessPackageResourcePackageAssociation.go b/sdk/go/azuread/accessPackageResourcePackageAssociation.go index f01afcf2f..fed0eb5c1 100644 --- a/sdk/go/azuread/accessPackageResourcePackageAssociation.go +++ b/sdk/go/azuread/accessPackageResourcePackageAssociation.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -113,6 +114,7 @@ func NewAccessPackageResourcePackageAssociation(ctx *pulumi.Context, if args.CatalogResourceAssociationId == nil { return nil, errors.New("invalid value for required argument 'CatalogResourceAssociationId'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource AccessPackageResourcePackageAssociation err := ctx.RegisterResource("azuread:index/accessPackageResourcePackageAssociation:AccessPackageResourcePackageAssociation", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/administrativeUnit.go b/sdk/go/azuread/administrativeUnit.go index b7fa2f341..21af254c8 100644 --- a/sdk/go/azuread/administrativeUnit.go +++ b/sdk/go/azuread/administrativeUnit.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -87,6 +88,7 @@ func NewAdministrativeUnit(ctx *pulumi.Context, if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource AdministrativeUnit err := ctx.RegisterResource("azuread:index/administrativeUnit:AdministrativeUnit", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/administrativeUnitMember.go b/sdk/go/azuread/administrativeUnitMember.go index 92b807c5e..d13ae19da 100644 --- a/sdk/go/azuread/administrativeUnitMember.go +++ b/sdk/go/azuread/administrativeUnitMember.go @@ -7,6 +7,7 @@ import ( "context" "reflect" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -88,6 +89,7 @@ func NewAdministrativeUnitMember(ctx *pulumi.Context, args = &AdministrativeUnitMemberArgs{} } + opts = internal.PkgResourceDefaultOpts(opts) var resource AdministrativeUnitMember err := ctx.RegisterResource("azuread:index/administrativeUnitMember:AdministrativeUnitMember", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/administrativeUnitRoleMember.go b/sdk/go/azuread/administrativeUnitRoleMember.go index be62305b4..c7351ed1c 100644 --- a/sdk/go/azuread/administrativeUnitRoleMember.go +++ b/sdk/go/azuread/administrativeUnitRoleMember.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -105,6 +106,7 @@ func NewAdministrativeUnitRoleMember(ctx *pulumi.Context, if args.RoleObjectId == nil { return nil, errors.New("invalid value for required argument 'RoleObjectId'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource AdministrativeUnitRoleMember err := ctx.RegisterResource("azuread:index/administrativeUnitRoleMember:AdministrativeUnitRoleMember", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/appRoleAssignment.go b/sdk/go/azuread/appRoleAssignment.go index 7397e9d05..f419566fd 100644 --- a/sdk/go/azuread/appRoleAssignment.go +++ b/sdk/go/azuread/appRoleAssignment.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -353,6 +354,7 @@ func NewAppRoleAssignment(ctx *pulumi.Context, if args.ResourceObjectId == nil { return nil, errors.New("invalid value for required argument 'ResourceObjectId'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource AppRoleAssignment err := ctx.RegisterResource("azuread:index/appRoleAssignment:AppRoleAssignment", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/application.go b/sdk/go/azuread/application.go index 1be4d7f2b..e939946bf 100644 --- a/sdk/go/azuread/application.go +++ b/sdk/go/azuread/application.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -319,6 +320,7 @@ func NewApplication(ctx *pulumi.Context, if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource Application err := ctx.RegisterResource("azuread:index/application:Application", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/applicationCertificate.go b/sdk/go/azuread/applicationCertificate.go index 198ae592b..8939fc508 100644 --- a/sdk/go/azuread/applicationCertificate.go +++ b/sdk/go/azuread/applicationCertificate.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -67,6 +68,7 @@ func NewApplicationCertificate(ctx *pulumi.Context, "value", }) opts = append(opts, secrets) + opts = internal.PkgResourceDefaultOpts(opts) var resource ApplicationCertificate err := ctx.RegisterResource("azuread:index/applicationCertificate:ApplicationCertificate", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/applicationFederatedIdentityCredential.go b/sdk/go/azuread/applicationFederatedIdentityCredential.go index 29521ccbc..9e4403f0a 100644 --- a/sdk/go/azuread/applicationFederatedIdentityCredential.go +++ b/sdk/go/azuread/applicationFederatedIdentityCredential.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -102,6 +103,7 @@ func NewApplicationFederatedIdentityCredential(ctx *pulumi.Context, if args.Subject == nil { return nil, errors.New("invalid value for required argument 'Subject'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource ApplicationFederatedIdentityCredential err := ctx.RegisterResource("azuread:index/applicationFederatedIdentityCredential:ApplicationFederatedIdentityCredential", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/applicationPassword.go b/sdk/go/azuread/applicationPassword.go index f5d2a9c0c..1c9bb0135 100644 --- a/sdk/go/azuread/applicationPassword.go +++ b/sdk/go/azuread/applicationPassword.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -125,6 +126,7 @@ func NewApplicationPassword(ctx *pulumi.Context, "value", }) opts = append(opts, secrets) + opts = internal.PkgResourceDefaultOpts(opts) var resource ApplicationPassword err := ctx.RegisterResource("azuread:index/applicationPassword:ApplicationPassword", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/applicationPreAuthorized.go b/sdk/go/azuread/applicationPreAuthorized.go index 3d58f060a..54f875469 100644 --- a/sdk/go/azuread/applicationPreAuthorized.go +++ b/sdk/go/azuread/applicationPreAuthorized.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -114,6 +115,7 @@ func NewApplicationPreAuthorized(ctx *pulumi.Context, if args.PermissionIds == nil { return nil, errors.New("invalid value for required argument 'PermissionIds'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource ApplicationPreAuthorized err := ctx.RegisterResource("azuread:index/applicationPreAuthorized:ApplicationPreAuthorized", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/claimsMappingPolicy.go b/sdk/go/azuread/claimsMappingPolicy.go index 48514214a..5d18834aa 100644 --- a/sdk/go/azuread/claimsMappingPolicy.go +++ b/sdk/go/azuread/claimsMappingPolicy.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -107,6 +108,7 @@ func NewClaimsMappingPolicy(ctx *pulumi.Context, if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource ClaimsMappingPolicy err := ctx.RegisterResource("azuread:index/claimsMappingPolicy:ClaimsMappingPolicy", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/conditionalAccessPolicy.go b/sdk/go/azuread/conditionalAccessPolicy.go index 8cbabb45a..29e7d377a 100644 --- a/sdk/go/azuread/conditionalAccessPolicy.go +++ b/sdk/go/azuread/conditionalAccessPolicy.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -244,8 +245,10 @@ type ConditionalAccessPolicy struct { // The friendly name for this Conditional Access Policy. DisplayName pulumi.StringOutput `pulumi:"displayName"` // A `grantControls` block as documented below, which specifies the grant controls that must be fulfilled to pass the policy. - GrantControls ConditionalAccessPolicyGrantControlsOutput `pulumi:"grantControls"` + GrantControls ConditionalAccessPolicyGrantControlsPtrOutput `pulumi:"grantControls"` // A `sessionControls` block as documented below, which specifies the session controls that are enforced after sign-in. + // + // > Note: At least one of `grantControls` and/or `sessionControls` blocks must be specified. SessionControls ConditionalAccessPolicySessionControlsPtrOutput `pulumi:"sessionControls"` // Specifies the state of the policy object. Possible values are: `enabled`, `disabled` and `enabledForReportingButNotEnforced` State pulumi.StringOutput `pulumi:"state"` @@ -264,12 +267,10 @@ func NewConditionalAccessPolicy(ctx *pulumi.Context, if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } - if args.GrantControls == nil { - return nil, errors.New("invalid value for required argument 'GrantControls'") - } if args.State == nil { return nil, errors.New("invalid value for required argument 'State'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource ConditionalAccessPolicy err := ctx.RegisterResource("azuread:index/conditionalAccessPolicy:ConditionalAccessPolicy", name, args, &resource, opts...) if err != nil { @@ -299,6 +300,8 @@ type conditionalAccessPolicyState struct { // A `grantControls` block as documented below, which specifies the grant controls that must be fulfilled to pass the policy. GrantControls *ConditionalAccessPolicyGrantControls `pulumi:"grantControls"` // A `sessionControls` block as documented below, which specifies the session controls that are enforced after sign-in. + // + // > Note: At least one of `grantControls` and/or `sessionControls` blocks must be specified. SessionControls *ConditionalAccessPolicySessionControls `pulumi:"sessionControls"` // Specifies the state of the policy object. Possible values are: `enabled`, `disabled` and `enabledForReportingButNotEnforced` State *string `pulumi:"state"` @@ -312,6 +315,8 @@ type ConditionalAccessPolicyState struct { // A `grantControls` block as documented below, which specifies the grant controls that must be fulfilled to pass the policy. GrantControls ConditionalAccessPolicyGrantControlsPtrInput // A `sessionControls` block as documented below, which specifies the session controls that are enforced after sign-in. + // + // > Note: At least one of `grantControls` and/or `sessionControls` blocks must be specified. SessionControls ConditionalAccessPolicySessionControlsPtrInput // Specifies the state of the policy object. Possible values are: `enabled`, `disabled` and `enabledForReportingButNotEnforced` State pulumi.StringPtrInput @@ -327,8 +332,10 @@ type conditionalAccessPolicyArgs struct { // The friendly name for this Conditional Access Policy. DisplayName string `pulumi:"displayName"` // A `grantControls` block as documented below, which specifies the grant controls that must be fulfilled to pass the policy. - GrantControls ConditionalAccessPolicyGrantControls `pulumi:"grantControls"` + GrantControls *ConditionalAccessPolicyGrantControls `pulumi:"grantControls"` // A `sessionControls` block as documented below, which specifies the session controls that are enforced after sign-in. + // + // > Note: At least one of `grantControls` and/or `sessionControls` blocks must be specified. SessionControls *ConditionalAccessPolicySessionControls `pulumi:"sessionControls"` // Specifies the state of the policy object. Possible values are: `enabled`, `disabled` and `enabledForReportingButNotEnforced` State string `pulumi:"state"` @@ -341,8 +348,10 @@ type ConditionalAccessPolicyArgs struct { // The friendly name for this Conditional Access Policy. DisplayName pulumi.StringInput // A `grantControls` block as documented below, which specifies the grant controls that must be fulfilled to pass the policy. - GrantControls ConditionalAccessPolicyGrantControlsInput + GrantControls ConditionalAccessPolicyGrantControlsPtrInput // A `sessionControls` block as documented below, which specifies the session controls that are enforced after sign-in. + // + // > Note: At least one of `grantControls` and/or `sessionControls` blocks must be specified. SessionControls ConditionalAccessPolicySessionControlsPtrInput // Specifies the state of the policy object. Possible values are: `enabled`, `disabled` and `enabledForReportingButNotEnforced` State pulumi.StringInput @@ -446,11 +455,13 @@ func (o ConditionalAccessPolicyOutput) DisplayName() pulumi.StringOutput { } // A `grantControls` block as documented below, which specifies the grant controls that must be fulfilled to pass the policy. -func (o ConditionalAccessPolicyOutput) GrantControls() ConditionalAccessPolicyGrantControlsOutput { - return o.ApplyT(func(v *ConditionalAccessPolicy) ConditionalAccessPolicyGrantControlsOutput { return v.GrantControls }).(ConditionalAccessPolicyGrantControlsOutput) +func (o ConditionalAccessPolicyOutput) GrantControls() ConditionalAccessPolicyGrantControlsPtrOutput { + return o.ApplyT(func(v *ConditionalAccessPolicy) ConditionalAccessPolicyGrantControlsPtrOutput { return v.GrantControls }).(ConditionalAccessPolicyGrantControlsPtrOutput) } // A `sessionControls` block as documented below, which specifies the session controls that are enforced after sign-in. +// +// > Note: At least one of `grantControls` and/or `sessionControls` blocks must be specified. func (o ConditionalAccessPolicyOutput) SessionControls() ConditionalAccessPolicySessionControlsPtrOutput { return o.ApplyT(func(v *ConditionalAccessPolicy) ConditionalAccessPolicySessionControlsPtrOutput { return v.SessionControls diff --git a/sdk/go/azuread/config/config.go b/sdk/go/azuread/config/config.go index d92e27a3a..1b2dac0fa 100644 --- a/sdk/go/azuread/config/config.go +++ b/sdk/go/azuread/config/config.go @@ -4,10 +4,13 @@ package config import ( + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) +var _ = internal.GetEnvOrDefault + // Base64 encoded PKCS#12 certificate bundle to use when authenticating as a Service Principal using a Client Certificate func GetClientCertificate(ctx *pulumi.Context) string { return config.Get(ctx, "azuread:clientCertificate") @@ -48,7 +51,7 @@ func GetEnvironment(ctx *pulumi.Context) string { return v } var value string - if d := getEnvOrDefault("public", nil, "ARM_ENVIRONMENT"); d != nil { + if d := internal.GetEnvOrDefault("public", nil, "ARM_ENVIRONMENT"); d != nil { value = d.(string) } return value @@ -66,7 +69,7 @@ func GetMsiEndpoint(ctx *pulumi.Context) string { return v } var value string - if d := getEnvOrDefault(nil, nil, "ARM_MSI_ENDPOINT"); d != nil { + if d := internal.GetEnvOrDefault(nil, nil, "ARM_MSI_ENDPOINT"); d != nil { value = d.(string) } return value @@ -116,7 +119,7 @@ func GetUseMsi(ctx *pulumi.Context) bool { return v } var value bool - if d := getEnvOrDefault(false, parseEnvBool, "ARM_USE_MSI"); d != nil { + if d := internal.GetEnvOrDefault(false, internal.ParseEnvBool, "ARM_USE_MSI"); d != nil { value = d.(bool) } return value diff --git a/sdk/go/azuread/customDirectoryRole.go b/sdk/go/azuread/customDirectoryRole.go index f3d552697..535e64062 100644 --- a/sdk/go/azuread/customDirectoryRole.go +++ b/sdk/go/azuread/customDirectoryRole.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -111,6 +112,7 @@ func NewCustomDirectoryRole(ctx *pulumi.Context, if args.Version == nil { return nil, errors.New("invalid value for required argument 'Version'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource CustomDirectoryRole err := ctx.RegisterResource("azuread:index/customDirectoryRole:CustomDirectoryRole", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/directoryRole.go b/sdk/go/azuread/directoryRole.go index 22378917e..5fbe0afb4 100644 --- a/sdk/go/azuread/directoryRole.go +++ b/sdk/go/azuread/directoryRole.go @@ -7,6 +7,7 @@ import ( "context" "reflect" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -103,6 +104,7 @@ func NewDirectoryRole(ctx *pulumi.Context, args = &DirectoryRoleArgs{} } + opts = internal.PkgResourceDefaultOpts(opts) var resource DirectoryRole err := ctx.RegisterResource("azuread:index/directoryRole:DirectoryRole", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/directoryRoleAssignment.go b/sdk/go/azuread/directoryRoleAssignment.go index 852fb489e..22bb07871 100644 --- a/sdk/go/azuread/directoryRoleAssignment.go +++ b/sdk/go/azuread/directoryRoleAssignment.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -62,6 +63,7 @@ func NewDirectoryRoleAssignment(ctx *pulumi.Context, if args.RoleId == nil { return nil, errors.New("invalid value for required argument 'RoleId'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource DirectoryRoleAssignment err := ctx.RegisterResource("azuread:index/directoryRoleAssignment:DirectoryRoleAssignment", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/directoryRoleMember.go b/sdk/go/azuread/directoryRoleMember.go index 005e3fc60..0287a98f8 100644 --- a/sdk/go/azuread/directoryRoleMember.go +++ b/sdk/go/azuread/directoryRoleMember.go @@ -7,6 +7,7 @@ import ( "context" "reflect" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -88,6 +89,7 @@ func NewDirectoryRoleMember(ctx *pulumi.Context, args = &DirectoryRoleMemberArgs{} } + opts = internal.PkgResourceDefaultOpts(opts) var resource DirectoryRoleMember err := ctx.RegisterResource("azuread:index/directoryRoleMember:DirectoryRoleMember", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/getAccessPackage.go b/sdk/go/azuread/getAccessPackage.go index d2509effe..ed5bb5a3a 100644 --- a/sdk/go/azuread/getAccessPackage.go +++ b/sdk/go/azuread/getAccessPackage.go @@ -7,6 +7,7 @@ import ( "context" "reflect" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -75,6 +76,7 @@ import ( // // ``` func LookupAccessPackage(ctx *pulumi.Context, args *LookupAccessPackageArgs, opts ...pulumi.InvokeOption) (*LookupAccessPackageResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupAccessPackageResult err := ctx.Invoke("azuread:index/getAccessPackage:getAccessPackage", args, &rv, opts...) if err != nil { diff --git a/sdk/go/azuread/getAccessPackageCatalog.go b/sdk/go/azuread/getAccessPackageCatalog.go index 4f6dbe07f..a056a60b5 100644 --- a/sdk/go/azuread/getAccessPackageCatalog.go +++ b/sdk/go/azuread/getAccessPackageCatalog.go @@ -7,6 +7,7 @@ import ( "context" "reflect" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -75,6 +76,7 @@ import ( // // ``` func LookupAccessPackageCatalog(ctx *pulumi.Context, args *LookupAccessPackageCatalogArgs, opts ...pulumi.InvokeOption) (*LookupAccessPackageCatalogResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupAccessPackageCatalogResult err := ctx.Invoke("azuread:index/getAccessPackageCatalog:getAccessPackageCatalog", args, &rv, opts...) if err != nil { diff --git a/sdk/go/azuread/getAccessPackageCatalogRole.go b/sdk/go/azuread/getAccessPackageCatalogRole.go index 1ce15158e..b09629371 100644 --- a/sdk/go/azuread/getAccessPackageCatalogRole.go +++ b/sdk/go/azuread/getAccessPackageCatalogRole.go @@ -7,6 +7,7 @@ import ( "context" "reflect" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -73,6 +74,7 @@ import ( // // ``` func GetAccessPackageCatalogRole(ctx *pulumi.Context, args *GetAccessPackageCatalogRoleArgs, opts ...pulumi.InvokeOption) (*GetAccessPackageCatalogRoleResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) var rv GetAccessPackageCatalogRoleResult err := ctx.Invoke("azuread:index/getAccessPackageCatalogRole:getAccessPackageCatalogRole", args, &rv, opts...) if err != nil { diff --git a/sdk/go/azuread/getAdministrativeUnit.go b/sdk/go/azuread/getAdministrativeUnit.go index 6a3d8c6d7..4ec4cd698 100644 --- a/sdk/go/azuread/getAdministrativeUnit.go +++ b/sdk/go/azuread/getAdministrativeUnit.go @@ -7,6 +7,7 @@ import ( "context" "reflect" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -73,6 +74,7 @@ import ( // // ``` func LookupAdministrativeUnit(ctx *pulumi.Context, args *LookupAdministrativeUnitArgs, opts ...pulumi.InvokeOption) (*LookupAdministrativeUnitResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupAdministrativeUnitResult err := ctx.Invoke("azuread:index/getAdministrativeUnit:getAdministrativeUnit", args, &rv, opts...) if err != nil { diff --git a/sdk/go/azuread/getApplication.go b/sdk/go/azuread/getApplication.go index 2d36d51c1..e80bea433 100644 --- a/sdk/go/azuread/getApplication.go +++ b/sdk/go/azuread/getApplication.go @@ -7,6 +7,7 @@ import ( "context" "reflect" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -47,6 +48,7 @@ import ( // // ``` func LookupApplication(ctx *pulumi.Context, args *LookupApplicationArgs, opts ...pulumi.InvokeOption) (*LookupApplicationResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupApplicationResult err := ctx.Invoke("azuread:index/getApplication:getApplication", args, &rv, opts...) if err != nil { diff --git a/sdk/go/azuread/getApplicationPublishedAppIds.go b/sdk/go/azuread/getApplicationPublishedAppIds.go index 5a34c43f7..94add8346 100644 --- a/sdk/go/azuread/getApplicationPublishedAppIds.go +++ b/sdk/go/azuread/getApplicationPublishedAppIds.go @@ -4,6 +4,7 @@ package azuread import ( + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -96,6 +97,7 @@ import ( // // ``` func GetApplicationPublishedAppIds(ctx *pulumi.Context, opts ...pulumi.InvokeOption) (*GetApplicationPublishedAppIdsResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) var rv GetApplicationPublishedAppIdsResult err := ctx.Invoke("azuread:index/getApplicationPublishedAppIds:getApplicationPublishedAppIds", nil, &rv, opts...) if err != nil { diff --git a/sdk/go/azuread/getApplicationTemplate.go b/sdk/go/azuread/getApplicationTemplate.go index 4dd72f200..59c136a91 100644 --- a/sdk/go/azuread/getApplicationTemplate.go +++ b/sdk/go/azuread/getApplicationTemplate.go @@ -7,6 +7,7 @@ import ( "context" "reflect" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -43,6 +44,7 @@ import ( // // ``` func GetApplicationTemplate(ctx *pulumi.Context, args *GetApplicationTemplateArgs, opts ...pulumi.InvokeOption) (*GetApplicationTemplateResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) var rv GetApplicationTemplateResult err := ctx.Invoke("azuread:index/getApplicationTemplate:getApplicationTemplate", args, &rv, opts...) if err != nil { diff --git a/sdk/go/azuread/getClientConfig.go b/sdk/go/azuread/getClientConfig.go index 67ad849e0..ab9743708 100644 --- a/sdk/go/azuread/getClientConfig.go +++ b/sdk/go/azuread/getClientConfig.go @@ -4,6 +4,7 @@ package azuread import ( + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -38,6 +39,7 @@ import ( // // ``` func GetClientConfig(ctx *pulumi.Context, opts ...pulumi.InvokeOption) (*GetClientConfigResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) var rv GetClientConfigResult err := ctx.Invoke("azuread:index/getClientConfig:getClientConfig", nil, &rv, opts...) if err != nil { diff --git a/sdk/go/azuread/getDirectoryObject.go b/sdk/go/azuread/getDirectoryObject.go index c9231fda3..14a725f47 100644 --- a/sdk/go/azuread/getDirectoryObject.go +++ b/sdk/go/azuread/getDirectoryObject.go @@ -7,6 +7,7 @@ import ( "context" "reflect" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -54,6 +55,7 @@ import ( // *`objectId` - The object ID of the directory object. // *`type` - The shortened OData type of the directory object. Possible values include: `Group`, `User` or `ServicePrincipal`. func GetDirectoryObject(ctx *pulumi.Context, args *GetDirectoryObjectArgs, opts ...pulumi.InvokeOption) (*GetDirectoryObjectResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) var rv GetDirectoryObjectResult err := ctx.Invoke("azuread:index/getDirectoryObject:getDirectoryObject", args, &rv, opts...) if err != nil { diff --git a/sdk/go/azuread/getDirectoryRoleTemplates.go b/sdk/go/azuread/getDirectoryRoleTemplates.go new file mode 100644 index 000000000..873b9fa8d --- /dev/null +++ b/sdk/go/azuread/getDirectoryRoleTemplates.go @@ -0,0 +1,63 @@ +// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package azuread + +import ( + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// Use this data source to access information about directory role templates within Azure Active Directory. +// +// ## API Permissions +// +// The following API permissions are required in order to use this resource. +// +// When authenticated with a service principal, this resource requires one of the following application roles: `RoleManagement.Read.Directory` or `Directory.Read.All` +// +// When authenticated with a user principal, this data source does not require any additional roles. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// current, err := azuread.GetDirectoryRoleTemplates(ctx, nil, nil) +// if err != nil { +// return err +// } +// ctx.Export("roles", current.ObjectIds) +// return nil +// }) +// } +// +// ``` +func GetDirectoryRoleTemplates(ctx *pulumi.Context, opts ...pulumi.InvokeOption) (*GetDirectoryRoleTemplatesResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv GetDirectoryRoleTemplatesResult + err := ctx.Invoke("azuread:index/getDirectoryRoleTemplates:getDirectoryRoleTemplates", nil, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of values returned by getDirectoryRoleTemplates. +type GetDirectoryRoleTemplatesResult struct { + // The provider-assigned unique ID for this managed resource. + Id string `pulumi:"id"` + // The object IDs of the role templates. + ObjectIds []string `pulumi:"objectIds"` + // A list of role templates. Each `roleTemplate` object provides the attributes documented below. + RoleTemplates []GetDirectoryRoleTemplatesRoleTemplate `pulumi:"roleTemplates"` +} diff --git a/sdk/go/azuread/getDirectoryRoles.go b/sdk/go/azuread/getDirectoryRoles.go index 82cd978b9..dd0638dda 100644 --- a/sdk/go/azuread/getDirectoryRoles.go +++ b/sdk/go/azuread/getDirectoryRoles.go @@ -4,6 +4,7 @@ package azuread import ( + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -42,6 +43,7 @@ import ( // // ``` func GetDirectoryRoles(ctx *pulumi.Context, opts ...pulumi.InvokeOption) (*GetDirectoryRolesResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) var rv GetDirectoryRolesResult err := ctx.Invoke("azuread:index/getDirectoryRoles:getDirectoryRoles", nil, &rv, opts...) if err != nil { diff --git a/sdk/go/azuread/getDomains.go b/sdk/go/azuread/getDomains.go index fb310dc07..61a0edf91 100644 --- a/sdk/go/azuread/getDomains.go +++ b/sdk/go/azuread/getDomains.go @@ -7,6 +7,7 @@ import ( "context" "reflect" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -49,6 +50,7 @@ import ( // // ``` func GetDomains(ctx *pulumi.Context, args *GetDomainsArgs, opts ...pulumi.InvokeOption) (*GetDomainsResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) var rv GetDomainsResult err := ctx.Invoke("azuread:index/getDomains:getDomains", args, &rv, opts...) if err != nil { diff --git a/sdk/go/azuread/getGroup.go b/sdk/go/azuread/getGroup.go index e9da7542f..345fcfa59 100644 --- a/sdk/go/azuread/getGroup.go +++ b/sdk/go/azuread/getGroup.go @@ -7,6 +7,7 @@ import ( "context" "reflect" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -48,6 +49,7 @@ import ( // // ``` func LookupGroup(ctx *pulumi.Context, args *LookupGroupArgs, opts ...pulumi.InvokeOption) (*LookupGroupResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupGroupResult err := ctx.Invoke("azuread:index/getGroup:getGroup", args, &rv, opts...) if err != nil { diff --git a/sdk/go/azuread/getGroups.go b/sdk/go/azuread/getGroups.go index 92ff13296..692341a5a 100644 --- a/sdk/go/azuread/getGroups.go +++ b/sdk/go/azuread/getGroups.go @@ -7,6 +7,7 @@ import ( "context" "reflect" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -153,6 +154,7 @@ import ( // // ``` func GetGroups(ctx *pulumi.Context, args *GetGroupsArgs, opts ...pulumi.InvokeOption) (*GetGroupsResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) var rv GetGroupsResult err := ctx.Invoke("azuread:index/getGroups:getGroups", args, &rv, opts...) if err != nil { diff --git a/sdk/go/azuread/getNamedLocation.go b/sdk/go/azuread/getNamedLocation.go new file mode 100644 index 000000000..8adad0950 --- /dev/null +++ b/sdk/go/azuread/getNamedLocation.go @@ -0,0 +1,152 @@ +// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package azuread + +import ( + "context" + "reflect" + + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// Gets information about a Named Location within Azure Active Directory. +// +// ## API Permissions +// +// The following API permissions are required in order to use this data source. +// +// When authenticated with a service principal, this resource requires the following application roles: `Policy.Read.All` +// +// When authenticated with a user principal, this resource requires one of the following directory roles: `Conditional Access Administrator` or `Global Reader` +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := azuread.LookupNamedLocation(ctx, &azuread.LookupNamedLocationArgs{ +// DisplayName: "My Named Location", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ## Attributes Reference +// +// The following attributes are exported: +// +// * `country` - A `country` block as documented below, which describes a country-based named location. +// * `id` - The ID of the named location. +// * `ip` - An `ip` block as documented below, which describes an IP-based named location. +// * +// *** +// +// `country` block exports the following: +// +// * `countriesAndRegions` - List of countries and/or regions in two-letter format specified by ISO 3166-2. +// * `includeUnknownCountriesAndRegions` - Whether IP addresses that don't map to a country or region are included in the named location. +// +// *** +// +// `ip` block exports the following: +// +// * `ipRanges` - List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. +// * `trusted` - Whether the named location is trusted. +func LookupNamedLocation(ctx *pulumi.Context, args *LookupNamedLocationArgs, opts ...pulumi.InvokeOption) (*LookupNamedLocationResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv LookupNamedLocationResult + err := ctx.Invoke("azuread:index/getNamedLocation:getNamedLocation", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getNamedLocation. +type LookupNamedLocationArgs struct { + // Specifies the display named of the named location to look up. + DisplayName string `pulumi:"displayName"` +} + +// A collection of values returned by getNamedLocation. +type LookupNamedLocationResult struct { + Countries []GetNamedLocationCountry `pulumi:"countries"` + DisplayName string `pulumi:"displayName"` + // The provider-assigned unique ID for this managed resource. + Id string `pulumi:"id"` + Ips []GetNamedLocationIp `pulumi:"ips"` +} + +func LookupNamedLocationOutput(ctx *pulumi.Context, args LookupNamedLocationOutputArgs, opts ...pulumi.InvokeOption) LookupNamedLocationResultOutput { + return pulumi.ToOutputWithContext(context.Background(), args). + ApplyT(func(v interface{}) (LookupNamedLocationResult, error) { + args := v.(LookupNamedLocationArgs) + r, err := LookupNamedLocation(ctx, &args, opts...) + var s LookupNamedLocationResult + if r != nil { + s = *r + } + return s, err + }).(LookupNamedLocationResultOutput) +} + +// A collection of arguments for invoking getNamedLocation. +type LookupNamedLocationOutputArgs struct { + // Specifies the display named of the named location to look up. + DisplayName pulumi.StringInput `pulumi:"displayName"` +} + +func (LookupNamedLocationOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*LookupNamedLocationArgs)(nil)).Elem() +} + +// A collection of values returned by getNamedLocation. +type LookupNamedLocationResultOutput struct{ *pulumi.OutputState } + +func (LookupNamedLocationResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*LookupNamedLocationResult)(nil)).Elem() +} + +func (o LookupNamedLocationResultOutput) ToLookupNamedLocationResultOutput() LookupNamedLocationResultOutput { + return o +} + +func (o LookupNamedLocationResultOutput) ToLookupNamedLocationResultOutputWithContext(ctx context.Context) LookupNamedLocationResultOutput { + return o +} + +func (o LookupNamedLocationResultOutput) Countries() GetNamedLocationCountryArrayOutput { + return o.ApplyT(func(v LookupNamedLocationResult) []GetNamedLocationCountry { return v.Countries }).(GetNamedLocationCountryArrayOutput) +} + +func (o LookupNamedLocationResultOutput) DisplayName() pulumi.StringOutput { + return o.ApplyT(func(v LookupNamedLocationResult) string { return v.DisplayName }).(pulumi.StringOutput) +} + +// The provider-assigned unique ID for this managed resource. +func (o LookupNamedLocationResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v LookupNamedLocationResult) string { return v.Id }).(pulumi.StringOutput) +} + +func (o LookupNamedLocationResultOutput) Ips() GetNamedLocationIpArrayOutput { + return o.ApplyT(func(v LookupNamedLocationResult) []GetNamedLocationIp { return v.Ips }).(GetNamedLocationIpArrayOutput) +} + +func init() { + pulumi.RegisterOutputType(LookupNamedLocationResultOutput{}) +} diff --git a/sdk/go/azuread/getServicePrincipal.go b/sdk/go/azuread/getServicePrincipal.go index e91f50617..f06a9ad0e 100644 --- a/sdk/go/azuread/getServicePrincipal.go +++ b/sdk/go/azuread/getServicePrincipal.go @@ -7,6 +7,7 @@ import ( "context" "reflect" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -100,6 +101,7 @@ import ( // // ``` func LookupServicePrincipal(ctx *pulumi.Context, args *LookupServicePrincipalArgs, opts ...pulumi.InvokeOption) (*LookupServicePrincipalResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupServicePrincipalResult err := ctx.Invoke("azuread:index/getServicePrincipal:getServicePrincipal", args, &rv, opts...) if err != nil { diff --git a/sdk/go/azuread/getServicePrincipals.go b/sdk/go/azuread/getServicePrincipals.go index 49b7a3933..8210248f6 100644 --- a/sdk/go/azuread/getServicePrincipals.go +++ b/sdk/go/azuread/getServicePrincipals.go @@ -7,6 +7,7 @@ import ( "context" "reflect" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -111,6 +112,7 @@ import ( // // ``` func GetServicePrincipals(ctx *pulumi.Context, args *GetServicePrincipalsArgs, opts ...pulumi.InvokeOption) (*GetServicePrincipalsResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) var rv GetServicePrincipalsResult err := ctx.Invoke("azuread:index/getServicePrincipals:getServicePrincipals", args, &rv, opts...) if err != nil { diff --git a/sdk/go/azuread/getUser.go b/sdk/go/azuread/getUser.go index 2ee317a81..551b7b5da 100644 --- a/sdk/go/azuread/getUser.go +++ b/sdk/go/azuread/getUser.go @@ -7,6 +7,7 @@ import ( "context" "reflect" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -46,6 +47,7 @@ import ( // // ``` func LookupUser(ctx *pulumi.Context, args *LookupUserArgs, opts ...pulumi.InvokeOption) (*LookupUserResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupUserResult err := ctx.Invoke("azuread:index/getUser:getUser", args, &rv, opts...) if err != nil { diff --git a/sdk/go/azuread/getUsers.go b/sdk/go/azuread/getUsers.go index 6fbd45ece..d969003c5 100644 --- a/sdk/go/azuread/getUsers.go +++ b/sdk/go/azuread/getUsers.go @@ -7,6 +7,7 @@ import ( "context" "reflect" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -49,6 +50,7 @@ import ( // // ``` func GetUsers(ctx *pulumi.Context, args *GetUsersArgs, opts ...pulumi.InvokeOption) (*GetUsersResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) var rv GetUsersResult err := ctx.Invoke("azuread:index/getUsers:getUsers", args, &rv, opts...) if err != nil { diff --git a/sdk/go/azuread/group.go b/sdk/go/azuread/group.go index 0e8cc0788..c903980fb 100644 --- a/sdk/go/azuread/group.go +++ b/sdk/go/azuread/group.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -133,6 +134,7 @@ func NewGroup(ctx *pulumi.Context, if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource Group err := ctx.RegisterResource("azuread:index/group:Group", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/groupMember.go b/sdk/go/azuread/groupMember.go index c1ac4c789..7ad17c6b1 100644 --- a/sdk/go/azuread/groupMember.go +++ b/sdk/go/azuread/groupMember.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -98,6 +99,7 @@ func NewGroupMember(ctx *pulumi.Context, if args.MemberObjectId == nil { return nil, errors.New("invalid value for required argument 'MemberObjectId'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource GroupMember err := ctx.RegisterResource("azuread:index/groupMember:GroupMember", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/init.go b/sdk/go/azuread/init.go index ef72d21aa..777db0032 100644 --- a/sdk/go/azuread/init.go +++ b/sdk/go/azuread/init.go @@ -7,6 +7,7 @@ import ( "fmt" "github.com/blang/semver" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -117,7 +118,10 @@ func (p *pkg) ConstructProvider(ctx *pulumi.Context, name, typ, urn string) (pul } func init() { - version, _ := PkgVersion() + version, err := internal.PkgVersion() + if err != nil { + version = semver.Version{Major: 1} + } pulumi.RegisterResourceModule( "azuread", "index/accessPackage", diff --git a/sdk/go/azuread/config/pulumiUtilities.go b/sdk/go/azuread/internal/pulumiUtilities.go similarity index 60% rename from sdk/go/azuread/config/pulumiUtilities.go rename to sdk/go/azuread/internal/pulumiUtilities.go index 1767cad99..e201f3a2d 100644 --- a/sdk/go/azuread/config/pulumiUtilities.go +++ b/sdk/go/azuread/internal/pulumiUtilities.go @@ -1,7 +1,7 @@ // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** -package config +package internal import ( "fmt" @@ -17,7 +17,7 @@ import ( type envParser func(v string) interface{} -func parseEnvBool(v string) interface{} { +func ParseEnvBool(v string) interface{} { b, err := strconv.ParseBool(v) if err != nil { return nil @@ -25,7 +25,7 @@ func parseEnvBool(v string) interface{} { return b } -func parseEnvInt(v string) interface{} { +func ParseEnvInt(v string) interface{} { i, err := strconv.ParseInt(v, 0, 0) if err != nil { return nil @@ -33,7 +33,7 @@ func parseEnvInt(v string) interface{} { return int(i) } -func parseEnvFloat(v string) interface{} { +func ParseEnvFloat(v string) interface{} { f, err := strconv.ParseFloat(v, 64) if err != nil { return nil @@ -41,7 +41,7 @@ func parseEnvFloat(v string) interface{} { return f } -func parseEnvStringArray(v string) interface{} { +func ParseEnvStringArray(v string) interface{} { var result pulumi.StringArray for _, item := range strings.Split(v, ";") { result = append(result, pulumi.String(item)) @@ -49,7 +49,7 @@ func parseEnvStringArray(v string) interface{} { return result } -func getEnvOrDefault(def interface{}, parser envParser, vars ...string) interface{} { +func GetEnvOrDefault(def interface{}, parser envParser, vars ...string) interface{} { for _, v := range vars { if value, ok := os.LookupEnv(v); ok { if parser != nil { @@ -65,6 +65,10 @@ func getEnvOrDefault(def interface{}, parser envParser, vars ...string) interfac // If a version cannot be determined, v1 will be assumed. The second return // value is always nil. func PkgVersion() (semver.Version, error) { + // emptyVersion defaults to v0.0.0 + if !SdkVersion.Equals(semver.Version{}) { + return SdkVersion, nil + } type sentinal struct{} pkgPath := reflect.TypeOf(sentinal{}).PkgPath() re := regexp.MustCompile("^.*/pulumi-azuread/sdk(/v\\d+)?") @@ -79,9 +83,31 @@ func PkgVersion() (semver.Version, error) { } // isZero is a null safe check for if a value is it's types zero value. -func isZero(v interface{}) bool { +func IsZero(v interface{}) bool { if v == nil { return true } return reflect.ValueOf(v).IsZero() } + +// PkgResourceDefaultOpts provides package level defaults to pulumi.OptionResource. +func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOption { + defaults := []pulumi.ResourceOption{} + + version := SdkVersion + if !version.Equals(semver.Version{}) { + defaults = append(defaults, pulumi.Version(version.String())) + } + return append(defaults, opts...) +} + +// PkgInvokeDefaultOpts provides package level defaults to pulumi.OptionInvoke. +func PkgInvokeDefaultOpts(opts []pulumi.InvokeOption) []pulumi.InvokeOption { + defaults := []pulumi.InvokeOption{} + + version := SdkVersion + if !version.Equals(semver.Version{}) { + defaults = append(defaults, pulumi.Version(version.String())) + } + return append(defaults, opts...) +} diff --git a/sdk/go/azuread/internal/pulumiVersion.go b/sdk/go/azuread/internal/pulumiVersion.go new file mode 100644 index 000000000..d59168766 --- /dev/null +++ b/sdk/go/azuread/internal/pulumiVersion.go @@ -0,0 +1,11 @@ +// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package internal + +import ( + "github.com/blang/semver" +) + +var SdkVersion semver.Version = semver.Version{} +var pluginDownloadURL string = "" diff --git a/sdk/go/azuread/invitation.go b/sdk/go/azuread/invitation.go index a484711ba..85389fc53 100644 --- a/sdk/go/azuread/invitation.go +++ b/sdk/go/azuread/invitation.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -147,6 +148,7 @@ func NewInvitation(ctx *pulumi.Context, if args.UserEmailAddress == nil { return nil, errors.New("invalid value for required argument 'UserEmailAddress'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource Invitation err := ctx.RegisterResource("azuread:index/invitation:Invitation", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/namedLocation.go b/sdk/go/azuread/namedLocation.go index a9fb8fbf5..0c2555324 100644 --- a/sdk/go/azuread/namedLocation.go +++ b/sdk/go/azuread/namedLocation.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -99,6 +100,7 @@ func NewNamedLocation(ctx *pulumi.Context, if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource NamedLocation err := ctx.RegisterResource("azuread:index/namedLocation:NamedLocation", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/provider.go b/sdk/go/azuread/provider.go index f04ada5f3..9ca53a993 100644 --- a/sdk/go/azuread/provider.go +++ b/sdk/go/azuread/provider.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -64,20 +65,21 @@ func NewProvider(ctx *pulumi.Context, return nil, errors.New("invalid value for required argument 'MetadataHost'") } if args.Environment == nil { - if d := getEnvOrDefault("public", nil, "ARM_ENVIRONMENT"); d != nil { + if d := internal.GetEnvOrDefault("public", nil, "ARM_ENVIRONMENT"); d != nil { args.Environment = pulumi.StringPtr(d.(string)) } } if args.MsiEndpoint == nil { - if d := getEnvOrDefault(nil, nil, "ARM_MSI_ENDPOINT"); d != nil { + if d := internal.GetEnvOrDefault(nil, nil, "ARM_MSI_ENDPOINT"); d != nil { args.MsiEndpoint = pulumi.StringPtr(d.(string)) } } if args.UseMsi == nil { - if d := getEnvOrDefault(false, parseEnvBool, "ARM_USE_MSI"); d != nil { + if d := internal.GetEnvOrDefault(false, internal.ParseEnvBool, "ARM_USE_MSI"); d != nil { args.UseMsi = pulumi.BoolPtr(d.(bool)) } } + opts = internal.PkgResourceDefaultOpts(opts) var resource Provider err := ctx.RegisterResource("pulumi:providers:azuread", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/pulumiTypes.go b/sdk/go/azuread/pulumiTypes.go index 476f089e4..75d6d7737 100644 --- a/sdk/go/azuread/pulumiTypes.go +++ b/sdk/go/azuread/pulumiTypes.go @@ -7,9 +7,12 @@ import ( "context" "reflect" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) +var _ = internal.GetEnvOrDefault + type AccessPackageAssignmentPolicyApprovalSettings struct { // Whether an approval is required. ApprovalRequired *bool `pulumi:"approvalRequired"` @@ -613,7 +616,7 @@ type AccessPackageAssignmentPolicyAssignmentReviewSettings struct { Enabled *bool `pulumi:"enabled"` // This will determine how often the access review campaign runs, valid values are `weekly`, `monthly`, `quarterly`, `halfyearly`, or `annual`. ReviewFrequency *string `pulumi:"reviewFrequency"` - // Self review or specific reviewers. Valid values are `Self`, or `Reviewers`. + // Self-review or specific reviewers. Valid values are `Manager`, `Reviewers`, or `Self`. ReviewType *string `pulumi:"reviewType"` // One or more `reviewer` blocks to specify the users who will be reviewers (when `reviewType` is `Reviewers`), as documented below. Reviewers []AccessPackageAssignmentPolicyAssignmentReviewSettingsReviewer `pulumi:"reviewers"` @@ -645,7 +648,7 @@ type AccessPackageAssignmentPolicyAssignmentReviewSettingsArgs struct { Enabled pulumi.BoolPtrInput `pulumi:"enabled"` // This will determine how often the access review campaign runs, valid values are `weekly`, `monthly`, `quarterly`, `halfyearly`, or `annual`. ReviewFrequency pulumi.StringPtrInput `pulumi:"reviewFrequency"` - // Self review or specific reviewers. Valid values are `Self`, or `Reviewers`. + // Self-review or specific reviewers. Valid values are `Manager`, `Reviewers`, or `Self`. ReviewType pulumi.StringPtrInput `pulumi:"reviewType"` // One or more `reviewer` blocks to specify the users who will be reviewers (when `reviewType` is `Reviewers`), as documented below. Reviewers AccessPackageAssignmentPolicyAssignmentReviewSettingsReviewerArrayInput `pulumi:"reviewers"` @@ -766,7 +769,7 @@ func (o AccessPackageAssignmentPolicyAssignmentReviewSettingsOutput) ReviewFrequ return o.ApplyT(func(v AccessPackageAssignmentPolicyAssignmentReviewSettings) *string { return v.ReviewFrequency }).(pulumi.StringPtrOutput) } -// Self review or specific reviewers. Valid values are `Self`, or `Reviewers`. +// Self-review or specific reviewers. Valid values are `Manager`, `Reviewers`, or `Self`. func (o AccessPackageAssignmentPolicyAssignmentReviewSettingsOutput) ReviewType() pulumi.StringPtrOutput { return o.ApplyT(func(v AccessPackageAssignmentPolicyAssignmentReviewSettings) *string { return v.ReviewType }).(pulumi.StringPtrOutput) } @@ -867,7 +870,7 @@ func (o AccessPackageAssignmentPolicyAssignmentReviewSettingsPtrOutput) ReviewFr }).(pulumi.StringPtrOutput) } -// Self review or specific reviewers. Valid values are `Self`, or `Reviewers`. +// Self-review or specific reviewers. Valid values are `Manager`, `Reviewers`, or `Self`. func (o AccessPackageAssignmentPolicyAssignmentReviewSettingsPtrOutput) ReviewType() pulumi.StringPtrOutput { return o.ApplyT(func(v *AccessPackageAssignmentPolicyAssignmentReviewSettings) *string { if v == nil { @@ -3890,7 +3893,9 @@ type ConditionalAccessPolicyConditions struct { Locations *ConditionalAccessPolicyConditionsLocations `pulumi:"locations"` // A `platforms` block as documented below, which specifies platforms included in and excluded from the policy. Platforms *ConditionalAccessPolicyConditionsPlatforms `pulumi:"platforms"` - // A list of sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. + // A list of service principal sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `none`, `unknownFutureValue`. + ServicePrincipalRiskLevels []string `pulumi:"servicePrincipalRiskLevels"` + // A list of user sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. SignInRiskLevels []string `pulumi:"signInRiskLevels"` // A list of user risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. UserRiskLevels []string `pulumi:"userRiskLevels"` @@ -3922,7 +3927,9 @@ type ConditionalAccessPolicyConditionsArgs struct { Locations ConditionalAccessPolicyConditionsLocationsPtrInput `pulumi:"locations"` // A `platforms` block as documented below, which specifies platforms included in and excluded from the policy. Platforms ConditionalAccessPolicyConditionsPlatformsPtrInput `pulumi:"platforms"` - // A list of sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. + // A list of service principal sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `none`, `unknownFutureValue`. + ServicePrincipalRiskLevels pulumi.StringArrayInput `pulumi:"servicePrincipalRiskLevels"` + // A list of user sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. SignInRiskLevels pulumi.StringArrayInput `pulumi:"signInRiskLevels"` // A list of user risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. UserRiskLevels pulumi.StringArrayInput `pulumi:"userRiskLevels"` @@ -4045,7 +4052,12 @@ func (o ConditionalAccessPolicyConditionsOutput) Platforms() ConditionalAccessPo }).(ConditionalAccessPolicyConditionsPlatformsPtrOutput) } -// A list of sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. +// A list of service principal sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `none`, `unknownFutureValue`. +func (o ConditionalAccessPolicyConditionsOutput) ServicePrincipalRiskLevels() pulumi.StringArrayOutput { + return o.ApplyT(func(v ConditionalAccessPolicyConditions) []string { return v.ServicePrincipalRiskLevels }).(pulumi.StringArrayOutput) +} + +// A list of user sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. func (o ConditionalAccessPolicyConditionsOutput) SignInRiskLevels() pulumi.StringArrayOutput { return o.ApplyT(func(v ConditionalAccessPolicyConditions) []string { return v.SignInRiskLevels }).(pulumi.StringArrayOutput) } @@ -4144,7 +4156,17 @@ func (o ConditionalAccessPolicyConditionsPtrOutput) Platforms() ConditionalAcces }).(ConditionalAccessPolicyConditionsPlatformsPtrOutput) } -// A list of sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. +// A list of service principal sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `none`, `unknownFutureValue`. +func (o ConditionalAccessPolicyConditionsPtrOutput) ServicePrincipalRiskLevels() pulumi.StringArrayOutput { + return o.ApplyT(func(v *ConditionalAccessPolicyConditions) []string { + if v == nil { + return nil + } + return v.ServicePrincipalRiskLevels + }).(pulumi.StringArrayOutput) +} + +// A list of user sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. func (o ConditionalAccessPolicyConditionsPtrOutput) SignInRiskLevels() pulumi.StringArrayOutput { return o.ApplyT(func(v *ConditionalAccessPolicyConditions) []string { if v == nil { @@ -6383,7 +6405,7 @@ func (o NamedLocationCountryPtrOutput) IncludeUnknownCountriesAndRegions() pulum } type NamedLocationIp struct { - // List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596. + // List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. IpRanges []string `pulumi:"ipRanges"` // Whether the named location is trusted. Defaults to `false`. Trusted *bool `pulumi:"trusted"` @@ -6401,7 +6423,7 @@ type NamedLocationIpInput interface { } type NamedLocationIpArgs struct { - // List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596. + // List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. IpRanges pulumi.StringArrayInput `pulumi:"ipRanges"` // Whether the named location is trusted. Defaults to `false`. Trusted pulumi.BoolPtrInput `pulumi:"trusted"` @@ -6484,7 +6506,7 @@ func (o NamedLocationIpOutput) ToNamedLocationIpPtrOutputWithContext(ctx context }).(NamedLocationIpPtrOutput) } -// List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596. +// List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. func (o NamedLocationIpOutput) IpRanges() pulumi.StringArrayOutput { return o.ApplyT(func(v NamedLocationIp) []string { return v.IpRanges }).(pulumi.StringArrayOutput) } @@ -6518,7 +6540,7 @@ func (o NamedLocationIpPtrOutput) Elem() NamedLocationIpOutput { }).(NamedLocationIpOutput) } -// List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596. +// List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. func (o NamedLocationIpPtrOutput) IpRanges() pulumi.StringArrayOutput { return o.ApplyT(func(v *NamedLocationIp) []string { if v == nil { @@ -9109,6 +9131,121 @@ func (o GetApplicationWebImplicitGrantArrayOutput) Index(i pulumi.IntInput) GetA }).(GetApplicationWebImplicitGrantOutput) } +type GetDirectoryRoleTemplatesRoleTemplate struct { + // The description of the directory role template. + Description string `pulumi:"description"` + // The display name of the directory role template. + DisplayName string `pulumi:"displayName"` + // The object ID of the directory role template. + ObjectId string `pulumi:"objectId"` +} + +// GetDirectoryRoleTemplatesRoleTemplateInput is an input type that accepts GetDirectoryRoleTemplatesRoleTemplateArgs and GetDirectoryRoleTemplatesRoleTemplateOutput values. +// You can construct a concrete instance of `GetDirectoryRoleTemplatesRoleTemplateInput` via: +// +// GetDirectoryRoleTemplatesRoleTemplateArgs{...} +type GetDirectoryRoleTemplatesRoleTemplateInput interface { + pulumi.Input + + ToGetDirectoryRoleTemplatesRoleTemplateOutput() GetDirectoryRoleTemplatesRoleTemplateOutput + ToGetDirectoryRoleTemplatesRoleTemplateOutputWithContext(context.Context) GetDirectoryRoleTemplatesRoleTemplateOutput +} + +type GetDirectoryRoleTemplatesRoleTemplateArgs struct { + // The description of the directory role template. + Description pulumi.StringInput `pulumi:"description"` + // The display name of the directory role template. + DisplayName pulumi.StringInput `pulumi:"displayName"` + // The object ID of the directory role template. + ObjectId pulumi.StringInput `pulumi:"objectId"` +} + +func (GetDirectoryRoleTemplatesRoleTemplateArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetDirectoryRoleTemplatesRoleTemplate)(nil)).Elem() +} + +func (i GetDirectoryRoleTemplatesRoleTemplateArgs) ToGetDirectoryRoleTemplatesRoleTemplateOutput() GetDirectoryRoleTemplatesRoleTemplateOutput { + return i.ToGetDirectoryRoleTemplatesRoleTemplateOutputWithContext(context.Background()) +} + +func (i GetDirectoryRoleTemplatesRoleTemplateArgs) ToGetDirectoryRoleTemplatesRoleTemplateOutputWithContext(ctx context.Context) GetDirectoryRoleTemplatesRoleTemplateOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetDirectoryRoleTemplatesRoleTemplateOutput) +} + +// GetDirectoryRoleTemplatesRoleTemplateArrayInput is an input type that accepts GetDirectoryRoleTemplatesRoleTemplateArray and GetDirectoryRoleTemplatesRoleTemplateArrayOutput values. +// You can construct a concrete instance of `GetDirectoryRoleTemplatesRoleTemplateArrayInput` via: +// +// GetDirectoryRoleTemplatesRoleTemplateArray{ GetDirectoryRoleTemplatesRoleTemplateArgs{...} } +type GetDirectoryRoleTemplatesRoleTemplateArrayInput interface { + pulumi.Input + + ToGetDirectoryRoleTemplatesRoleTemplateArrayOutput() GetDirectoryRoleTemplatesRoleTemplateArrayOutput + ToGetDirectoryRoleTemplatesRoleTemplateArrayOutputWithContext(context.Context) GetDirectoryRoleTemplatesRoleTemplateArrayOutput +} + +type GetDirectoryRoleTemplatesRoleTemplateArray []GetDirectoryRoleTemplatesRoleTemplateInput + +func (GetDirectoryRoleTemplatesRoleTemplateArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetDirectoryRoleTemplatesRoleTemplate)(nil)).Elem() +} + +func (i GetDirectoryRoleTemplatesRoleTemplateArray) ToGetDirectoryRoleTemplatesRoleTemplateArrayOutput() GetDirectoryRoleTemplatesRoleTemplateArrayOutput { + return i.ToGetDirectoryRoleTemplatesRoleTemplateArrayOutputWithContext(context.Background()) +} + +func (i GetDirectoryRoleTemplatesRoleTemplateArray) ToGetDirectoryRoleTemplatesRoleTemplateArrayOutputWithContext(ctx context.Context) GetDirectoryRoleTemplatesRoleTemplateArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetDirectoryRoleTemplatesRoleTemplateArrayOutput) +} + +type GetDirectoryRoleTemplatesRoleTemplateOutput struct{ *pulumi.OutputState } + +func (GetDirectoryRoleTemplatesRoleTemplateOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetDirectoryRoleTemplatesRoleTemplate)(nil)).Elem() +} + +func (o GetDirectoryRoleTemplatesRoleTemplateOutput) ToGetDirectoryRoleTemplatesRoleTemplateOutput() GetDirectoryRoleTemplatesRoleTemplateOutput { + return o +} + +func (o GetDirectoryRoleTemplatesRoleTemplateOutput) ToGetDirectoryRoleTemplatesRoleTemplateOutputWithContext(ctx context.Context) GetDirectoryRoleTemplatesRoleTemplateOutput { + return o +} + +// The description of the directory role template. +func (o GetDirectoryRoleTemplatesRoleTemplateOutput) Description() pulumi.StringOutput { + return o.ApplyT(func(v GetDirectoryRoleTemplatesRoleTemplate) string { return v.Description }).(pulumi.StringOutput) +} + +// The display name of the directory role template. +func (o GetDirectoryRoleTemplatesRoleTemplateOutput) DisplayName() pulumi.StringOutput { + return o.ApplyT(func(v GetDirectoryRoleTemplatesRoleTemplate) string { return v.DisplayName }).(pulumi.StringOutput) +} + +// The object ID of the directory role template. +func (o GetDirectoryRoleTemplatesRoleTemplateOutput) ObjectId() pulumi.StringOutput { + return o.ApplyT(func(v GetDirectoryRoleTemplatesRoleTemplate) string { return v.ObjectId }).(pulumi.StringOutput) +} + +type GetDirectoryRoleTemplatesRoleTemplateArrayOutput struct{ *pulumi.OutputState } + +func (GetDirectoryRoleTemplatesRoleTemplateArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetDirectoryRoleTemplatesRoleTemplate)(nil)).Elem() +} + +func (o GetDirectoryRoleTemplatesRoleTemplateArrayOutput) ToGetDirectoryRoleTemplatesRoleTemplateArrayOutput() GetDirectoryRoleTemplatesRoleTemplateArrayOutput { + return o +} + +func (o GetDirectoryRoleTemplatesRoleTemplateArrayOutput) ToGetDirectoryRoleTemplatesRoleTemplateArrayOutputWithContext(ctx context.Context) GetDirectoryRoleTemplatesRoleTemplateArrayOutput { + return o +} + +func (o GetDirectoryRoleTemplatesRoleTemplateArrayOutput) Index(i pulumi.IntInput) GetDirectoryRoleTemplatesRoleTemplateOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetDirectoryRoleTemplatesRoleTemplate { + return vs[0].([]GetDirectoryRoleTemplatesRoleTemplate)[vs[1].(int)] + }).(GetDirectoryRoleTemplatesRoleTemplateOutput) +} + type GetDirectoryRolesRole struct { // The description of the directory role. Description string `pulumi:"description"` @@ -9499,6 +9636,206 @@ func (o GetGroupDynamicMembershipArrayOutput) Index(i pulumi.IntInput) GetGroupD }).(GetGroupDynamicMembershipOutput) } +type GetNamedLocationCountry struct { + CountriesAndRegions []string `pulumi:"countriesAndRegions"` + IncludeUnknownCountriesAndRegions bool `pulumi:"includeUnknownCountriesAndRegions"` +} + +// GetNamedLocationCountryInput is an input type that accepts GetNamedLocationCountryArgs and GetNamedLocationCountryOutput values. +// You can construct a concrete instance of `GetNamedLocationCountryInput` via: +// +// GetNamedLocationCountryArgs{...} +type GetNamedLocationCountryInput interface { + pulumi.Input + + ToGetNamedLocationCountryOutput() GetNamedLocationCountryOutput + ToGetNamedLocationCountryOutputWithContext(context.Context) GetNamedLocationCountryOutput +} + +type GetNamedLocationCountryArgs struct { + CountriesAndRegions pulumi.StringArrayInput `pulumi:"countriesAndRegions"` + IncludeUnknownCountriesAndRegions pulumi.BoolInput `pulumi:"includeUnknownCountriesAndRegions"` +} + +func (GetNamedLocationCountryArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetNamedLocationCountry)(nil)).Elem() +} + +func (i GetNamedLocationCountryArgs) ToGetNamedLocationCountryOutput() GetNamedLocationCountryOutput { + return i.ToGetNamedLocationCountryOutputWithContext(context.Background()) +} + +func (i GetNamedLocationCountryArgs) ToGetNamedLocationCountryOutputWithContext(ctx context.Context) GetNamedLocationCountryOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetNamedLocationCountryOutput) +} + +// GetNamedLocationCountryArrayInput is an input type that accepts GetNamedLocationCountryArray and GetNamedLocationCountryArrayOutput values. +// You can construct a concrete instance of `GetNamedLocationCountryArrayInput` via: +// +// GetNamedLocationCountryArray{ GetNamedLocationCountryArgs{...} } +type GetNamedLocationCountryArrayInput interface { + pulumi.Input + + ToGetNamedLocationCountryArrayOutput() GetNamedLocationCountryArrayOutput + ToGetNamedLocationCountryArrayOutputWithContext(context.Context) GetNamedLocationCountryArrayOutput +} + +type GetNamedLocationCountryArray []GetNamedLocationCountryInput + +func (GetNamedLocationCountryArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetNamedLocationCountry)(nil)).Elem() +} + +func (i GetNamedLocationCountryArray) ToGetNamedLocationCountryArrayOutput() GetNamedLocationCountryArrayOutput { + return i.ToGetNamedLocationCountryArrayOutputWithContext(context.Background()) +} + +func (i GetNamedLocationCountryArray) ToGetNamedLocationCountryArrayOutputWithContext(ctx context.Context) GetNamedLocationCountryArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetNamedLocationCountryArrayOutput) +} + +type GetNamedLocationCountryOutput struct{ *pulumi.OutputState } + +func (GetNamedLocationCountryOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetNamedLocationCountry)(nil)).Elem() +} + +func (o GetNamedLocationCountryOutput) ToGetNamedLocationCountryOutput() GetNamedLocationCountryOutput { + return o +} + +func (o GetNamedLocationCountryOutput) ToGetNamedLocationCountryOutputWithContext(ctx context.Context) GetNamedLocationCountryOutput { + return o +} + +func (o GetNamedLocationCountryOutput) CountriesAndRegions() pulumi.StringArrayOutput { + return o.ApplyT(func(v GetNamedLocationCountry) []string { return v.CountriesAndRegions }).(pulumi.StringArrayOutput) +} + +func (o GetNamedLocationCountryOutput) IncludeUnknownCountriesAndRegions() pulumi.BoolOutput { + return o.ApplyT(func(v GetNamedLocationCountry) bool { return v.IncludeUnknownCountriesAndRegions }).(pulumi.BoolOutput) +} + +type GetNamedLocationCountryArrayOutput struct{ *pulumi.OutputState } + +func (GetNamedLocationCountryArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetNamedLocationCountry)(nil)).Elem() +} + +func (o GetNamedLocationCountryArrayOutput) ToGetNamedLocationCountryArrayOutput() GetNamedLocationCountryArrayOutput { + return o +} + +func (o GetNamedLocationCountryArrayOutput) ToGetNamedLocationCountryArrayOutputWithContext(ctx context.Context) GetNamedLocationCountryArrayOutput { + return o +} + +func (o GetNamedLocationCountryArrayOutput) Index(i pulumi.IntInput) GetNamedLocationCountryOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetNamedLocationCountry { + return vs[0].([]GetNamedLocationCountry)[vs[1].(int)] + }).(GetNamedLocationCountryOutput) +} + +type GetNamedLocationIp struct { + IpRanges []string `pulumi:"ipRanges"` + Trusted bool `pulumi:"trusted"` +} + +// GetNamedLocationIpInput is an input type that accepts GetNamedLocationIpArgs and GetNamedLocationIpOutput values. +// You can construct a concrete instance of `GetNamedLocationIpInput` via: +// +// GetNamedLocationIpArgs{...} +type GetNamedLocationIpInput interface { + pulumi.Input + + ToGetNamedLocationIpOutput() GetNamedLocationIpOutput + ToGetNamedLocationIpOutputWithContext(context.Context) GetNamedLocationIpOutput +} + +type GetNamedLocationIpArgs struct { + IpRanges pulumi.StringArrayInput `pulumi:"ipRanges"` + Trusted pulumi.BoolInput `pulumi:"trusted"` +} + +func (GetNamedLocationIpArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetNamedLocationIp)(nil)).Elem() +} + +func (i GetNamedLocationIpArgs) ToGetNamedLocationIpOutput() GetNamedLocationIpOutput { + return i.ToGetNamedLocationIpOutputWithContext(context.Background()) +} + +func (i GetNamedLocationIpArgs) ToGetNamedLocationIpOutputWithContext(ctx context.Context) GetNamedLocationIpOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetNamedLocationIpOutput) +} + +// GetNamedLocationIpArrayInput is an input type that accepts GetNamedLocationIpArray and GetNamedLocationIpArrayOutput values. +// You can construct a concrete instance of `GetNamedLocationIpArrayInput` via: +// +// GetNamedLocationIpArray{ GetNamedLocationIpArgs{...} } +type GetNamedLocationIpArrayInput interface { + pulumi.Input + + ToGetNamedLocationIpArrayOutput() GetNamedLocationIpArrayOutput + ToGetNamedLocationIpArrayOutputWithContext(context.Context) GetNamedLocationIpArrayOutput +} + +type GetNamedLocationIpArray []GetNamedLocationIpInput + +func (GetNamedLocationIpArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetNamedLocationIp)(nil)).Elem() +} + +func (i GetNamedLocationIpArray) ToGetNamedLocationIpArrayOutput() GetNamedLocationIpArrayOutput { + return i.ToGetNamedLocationIpArrayOutputWithContext(context.Background()) +} + +func (i GetNamedLocationIpArray) ToGetNamedLocationIpArrayOutputWithContext(ctx context.Context) GetNamedLocationIpArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(GetNamedLocationIpArrayOutput) +} + +type GetNamedLocationIpOutput struct{ *pulumi.OutputState } + +func (GetNamedLocationIpOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetNamedLocationIp)(nil)).Elem() +} + +func (o GetNamedLocationIpOutput) ToGetNamedLocationIpOutput() GetNamedLocationIpOutput { + return o +} + +func (o GetNamedLocationIpOutput) ToGetNamedLocationIpOutputWithContext(ctx context.Context) GetNamedLocationIpOutput { + return o +} + +func (o GetNamedLocationIpOutput) IpRanges() pulumi.StringArrayOutput { + return o.ApplyT(func(v GetNamedLocationIp) []string { return v.IpRanges }).(pulumi.StringArrayOutput) +} + +func (o GetNamedLocationIpOutput) Trusted() pulumi.BoolOutput { + return o.ApplyT(func(v GetNamedLocationIp) bool { return v.Trusted }).(pulumi.BoolOutput) +} + +type GetNamedLocationIpArrayOutput struct{ *pulumi.OutputState } + +func (GetNamedLocationIpArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]GetNamedLocationIp)(nil)).Elem() +} + +func (o GetNamedLocationIpArrayOutput) ToGetNamedLocationIpArrayOutput() GetNamedLocationIpArrayOutput { + return o +} + +func (o GetNamedLocationIpArrayOutput) ToGetNamedLocationIpArrayOutputWithContext(ctx context.Context) GetNamedLocationIpArrayOutput { + return o +} + +func (o GetNamedLocationIpArrayOutput) Index(i pulumi.IntInput) GetNamedLocationIpOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetNamedLocationIp { + return vs[0].([]GetNamedLocationIp)[vs[1].(int)] + }).(GetNamedLocationIpOutput) +} + type GetServicePrincipalAppRole struct { // Specifies whether this app role definition can be assigned to users and groups, or to other applications (that are accessing this application in daemon service scenarios). Possible values are: `User` and `Application`, or both. AllowedMemberTypes []string `pulumi:"allowedMemberTypes"` @@ -10644,12 +10981,18 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*GetApplicationWebArrayInput)(nil)).Elem(), GetApplicationWebArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetApplicationWebImplicitGrantInput)(nil)).Elem(), GetApplicationWebImplicitGrantArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetApplicationWebImplicitGrantArrayInput)(nil)).Elem(), GetApplicationWebImplicitGrantArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetDirectoryRoleTemplatesRoleTemplateInput)(nil)).Elem(), GetDirectoryRoleTemplatesRoleTemplateArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetDirectoryRoleTemplatesRoleTemplateArrayInput)(nil)).Elem(), GetDirectoryRoleTemplatesRoleTemplateArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetDirectoryRolesRoleInput)(nil)).Elem(), GetDirectoryRolesRoleArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetDirectoryRolesRoleArrayInput)(nil)).Elem(), GetDirectoryRolesRoleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetDomainsDomainInput)(nil)).Elem(), GetDomainsDomainArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetDomainsDomainArrayInput)(nil)).Elem(), GetDomainsDomainArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetGroupDynamicMembershipInput)(nil)).Elem(), GetGroupDynamicMembershipArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetGroupDynamicMembershipArrayInput)(nil)).Elem(), GetGroupDynamicMembershipArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetNamedLocationCountryInput)(nil)).Elem(), GetNamedLocationCountryArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetNamedLocationCountryArrayInput)(nil)).Elem(), GetNamedLocationCountryArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetNamedLocationIpInput)(nil)).Elem(), GetNamedLocationIpArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*GetNamedLocationIpArrayInput)(nil)).Elem(), GetNamedLocationIpArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetServicePrincipalAppRoleInput)(nil)).Elem(), GetServicePrincipalAppRoleArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetServicePrincipalAppRoleArrayInput)(nil)).Elem(), GetServicePrincipalAppRoleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetServicePrincipalFeatureInput)(nil)).Elem(), GetServicePrincipalFeatureArgs{}) @@ -10790,12 +11133,18 @@ func init() { pulumi.RegisterOutputType(GetApplicationWebArrayOutput{}) pulumi.RegisterOutputType(GetApplicationWebImplicitGrantOutput{}) pulumi.RegisterOutputType(GetApplicationWebImplicitGrantArrayOutput{}) + pulumi.RegisterOutputType(GetDirectoryRoleTemplatesRoleTemplateOutput{}) + pulumi.RegisterOutputType(GetDirectoryRoleTemplatesRoleTemplateArrayOutput{}) pulumi.RegisterOutputType(GetDirectoryRolesRoleOutput{}) pulumi.RegisterOutputType(GetDirectoryRolesRoleArrayOutput{}) pulumi.RegisterOutputType(GetDomainsDomainOutput{}) pulumi.RegisterOutputType(GetDomainsDomainArrayOutput{}) pulumi.RegisterOutputType(GetGroupDynamicMembershipOutput{}) pulumi.RegisterOutputType(GetGroupDynamicMembershipArrayOutput{}) + pulumi.RegisterOutputType(GetNamedLocationCountryOutput{}) + pulumi.RegisterOutputType(GetNamedLocationCountryArrayOutput{}) + pulumi.RegisterOutputType(GetNamedLocationIpOutput{}) + pulumi.RegisterOutputType(GetNamedLocationIpArrayOutput{}) pulumi.RegisterOutputType(GetServicePrincipalAppRoleOutput{}) pulumi.RegisterOutputType(GetServicePrincipalAppRoleArrayOutput{}) pulumi.RegisterOutputType(GetServicePrincipalFeatureOutput{}) diff --git a/sdk/go/azuread/pulumiUtilities.go b/sdk/go/azuread/pulumiUtilities.go deleted file mode 100644 index 57f6feef6..000000000 --- a/sdk/go/azuread/pulumiUtilities.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. -// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** - -package azuread - -import ( - "fmt" - "os" - "reflect" - "regexp" - "strconv" - "strings" - - "github.com/blang/semver" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -) - -type envParser func(v string) interface{} - -func parseEnvBool(v string) interface{} { - b, err := strconv.ParseBool(v) - if err != nil { - return nil - } - return b -} - -func parseEnvInt(v string) interface{} { - i, err := strconv.ParseInt(v, 0, 0) - if err != nil { - return nil - } - return int(i) -} - -func parseEnvFloat(v string) interface{} { - f, err := strconv.ParseFloat(v, 64) - if err != nil { - return nil - } - return f -} - -func parseEnvStringArray(v string) interface{} { - var result pulumi.StringArray - for _, item := range strings.Split(v, ";") { - result = append(result, pulumi.String(item)) - } - return result -} - -func getEnvOrDefault(def interface{}, parser envParser, vars ...string) interface{} { - for _, v := range vars { - if value, ok := os.LookupEnv(v); ok { - if parser != nil { - return parser(value) - } - return value - } - } - return def -} - -// PkgVersion uses reflection to determine the version of the current package. -// If a version cannot be determined, v1 will be assumed. The second return -// value is always nil. -func PkgVersion() (semver.Version, error) { - type sentinal struct{} - pkgPath := reflect.TypeOf(sentinal{}).PkgPath() - re := regexp.MustCompile("^.*/pulumi-azuread/sdk(/v\\d+)?") - if match := re.FindStringSubmatch(pkgPath); match != nil { - vStr := match[1] - if len(vStr) == 0 { // If the version capture group was empty, default to v1. - return semver.Version{Major: 1}, nil - } - return semver.MustParse(fmt.Sprintf("%s.0.0", vStr[2:])), nil - } - return semver.Version{Major: 1}, nil -} - -// isZero is a null safe check for if a value is it's types zero value. -func isZero(v interface{}) bool { - if v == nil { - return true - } - return reflect.ValueOf(v).IsZero() -} diff --git a/sdk/go/azuread/servicePrincipal.go b/sdk/go/azuread/servicePrincipal.go index 78236cdf6..e44ecda75 100644 --- a/sdk/go/azuread/servicePrincipal.go +++ b/sdk/go/azuread/servicePrincipal.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -264,6 +265,7 @@ func NewServicePrincipal(ctx *pulumi.Context, if args.ApplicationId == nil { return nil, errors.New("invalid value for required argument 'ApplicationId'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource ServicePrincipal err := ctx.RegisterResource("azuread:index/servicePrincipal:ServicePrincipal", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/servicePrincipalCertificate.go b/sdk/go/azuread/servicePrincipalCertificate.go index 520f070fd..15ffdef7c 100644 --- a/sdk/go/azuread/servicePrincipalCertificate.go +++ b/sdk/go/azuread/servicePrincipalCertificate.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -77,6 +78,7 @@ func NewServicePrincipalCertificate(ctx *pulumi.Context, "value", }) opts = append(opts, secrets) + opts = internal.PkgResourceDefaultOpts(opts) var resource ServicePrincipalCertificate err := ctx.RegisterResource("azuread:index/servicePrincipalCertificate:ServicePrincipalCertificate", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/servicePrincipalClaimsMappingPolicyAssignment.go b/sdk/go/azuread/servicePrincipalClaimsMappingPolicyAssignment.go index 271c522f0..fb6c7ef41 100644 --- a/sdk/go/azuread/servicePrincipalClaimsMappingPolicyAssignment.go +++ b/sdk/go/azuread/servicePrincipalClaimsMappingPolicyAssignment.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -79,6 +80,7 @@ func NewServicePrincipalClaimsMappingPolicyAssignment(ctx *pulumi.Context, if args.ServicePrincipalId == nil { return nil, errors.New("invalid value for required argument 'ServicePrincipalId'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource ServicePrincipalClaimsMappingPolicyAssignment err := ctx.RegisterResource("azuread:index/servicePrincipalClaimsMappingPolicyAssignment:ServicePrincipalClaimsMappingPolicyAssignment", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/servicePrincipalDelegatedPermissionGrant.go b/sdk/go/azuread/servicePrincipalDelegatedPermissionGrant.go index 28df76c49..d5d795ce6 100644 --- a/sdk/go/azuread/servicePrincipalDelegatedPermissionGrant.go +++ b/sdk/go/azuread/servicePrincipalDelegatedPermissionGrant.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -219,6 +220,7 @@ func NewServicePrincipalDelegatedPermissionGrant(ctx *pulumi.Context, if args.ServicePrincipalObjectId == nil { return nil, errors.New("invalid value for required argument 'ServicePrincipalObjectId'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource ServicePrincipalDelegatedPermissionGrant err := ctx.RegisterResource("azuread:index/servicePrincipalDelegatedPermissionGrant:ServicePrincipalDelegatedPermissionGrant", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/servicePrincipalPassword.go b/sdk/go/azuread/servicePrincipalPassword.go index 3cce51308..5d8946aad 100644 --- a/sdk/go/azuread/servicePrincipalPassword.go +++ b/sdk/go/azuread/servicePrincipalPassword.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -147,6 +148,7 @@ func NewServicePrincipalPassword(ctx *pulumi.Context, "value", }) opts = append(opts, secrets) + opts = internal.PkgResourceDefaultOpts(opts) var resource ServicePrincipalPassword err := ctx.RegisterResource("azuread:index/servicePrincipalPassword:ServicePrincipalPassword", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/servicePrincipalTokenSigningCertificate.go b/sdk/go/azuread/servicePrincipalTokenSigningCertificate.go index afced0010..6703cfc8e 100644 --- a/sdk/go/azuread/servicePrincipalTokenSigningCertificate.go +++ b/sdk/go/azuread/servicePrincipalTokenSigningCertificate.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -149,6 +150,7 @@ func NewServicePrincipalTokenSigningCertificate(ctx *pulumi.Context, "value", }) opts = append(opts, secrets) + opts = internal.PkgResourceDefaultOpts(opts) var resource ServicePrincipalTokenSigningCertificate err := ctx.RegisterResource("azuread:index/servicePrincipalTokenSigningCertificate:ServicePrincipalTokenSigningCertificate", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/synchronizationJob.go b/sdk/go/azuread/synchronizationJob.go index 1f13b4c28..e88b15dab 100644 --- a/sdk/go/azuread/synchronizationJob.go +++ b/sdk/go/azuread/synchronizationJob.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -128,6 +129,7 @@ func NewSynchronizationJob(ctx *pulumi.Context, if args.TemplateId == nil { return nil, errors.New("invalid value for required argument 'TemplateId'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource SynchronizationJob err := ctx.RegisterResource("azuread:index/synchronizationJob:SynchronizationJob", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/synchronizationSecret.go b/sdk/go/azuread/synchronizationSecret.go index 488595994..b24da6191 100644 --- a/sdk/go/azuread/synchronizationSecret.go +++ b/sdk/go/azuread/synchronizationSecret.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -105,6 +106,7 @@ func NewSynchronizationSecret(ctx *pulumi.Context, if args.ServicePrincipalId == nil { return nil, errors.New("invalid value for required argument 'ServicePrincipalId'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource SynchronizationSecret err := ctx.RegisterResource("azuread:index/synchronizationSecret:SynchronizationSecret", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/user.go b/sdk/go/azuread/user.go index bfc069742..83c3ff815 100644 --- a/sdk/go/azuread/user.go +++ b/sdk/go/azuread/user.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -181,6 +182,7 @@ func NewUser(ctx *pulumi.Context, "password", }) opts = append(opts, secrets) + opts = internal.PkgResourceDefaultOpts(opts) var resource User err := ctx.RegisterResource("azuread:index/user:User", name, args, &resource, opts...) if err != nil { diff --git a/sdk/go/azuread/userFlowAttribute.go b/sdk/go/azuread/userFlowAttribute.go index 52edce333..205c897df 100644 --- a/sdk/go/azuread/userFlowAttribute.go +++ b/sdk/go/azuread/userFlowAttribute.go @@ -8,6 +8,7 @@ import ( "reflect" "errors" + "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -89,6 +90,7 @@ func NewUserFlowAttribute(ctx *pulumi.Context, if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } + opts = internal.PkgResourceDefaultOpts(opts) var resource UserFlowAttribute err := ctx.RegisterResource("azuread:index/userFlowAttribute:UserFlowAttribute", name, args, &resource, opts...) if err != nil { diff --git a/sdk/java/src/main/java/com/pulumi/azuread/AzureadFunctions.java b/sdk/java/src/main/java/com/pulumi/azuread/AzureadFunctions.java index d979ea3c1..03610ae71 100644 --- a/sdk/java/src/main/java/com/pulumi/azuread/AzureadFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/azuread/AzureadFunctions.java @@ -24,6 +24,8 @@ import com.pulumi.azuread.inputs.GetGroupPlainArgs; import com.pulumi.azuread.inputs.GetGroupsArgs; import com.pulumi.azuread.inputs.GetGroupsPlainArgs; +import com.pulumi.azuread.inputs.GetNamedLocationArgs; +import com.pulumi.azuread.inputs.GetNamedLocationPlainArgs; import com.pulumi.azuread.inputs.GetServicePrincipalArgs; import com.pulumi.azuread.inputs.GetServicePrincipalPlainArgs; import com.pulumi.azuread.inputs.GetServicePrincipalsArgs; @@ -41,10 +43,12 @@ import com.pulumi.azuread.outputs.GetApplicationTemplateResult; import com.pulumi.azuread.outputs.GetClientConfigResult; import com.pulumi.azuread.outputs.GetDirectoryObjectResult; +import com.pulumi.azuread.outputs.GetDirectoryRoleTemplatesResult; import com.pulumi.azuread.outputs.GetDirectoryRolesResult; import com.pulumi.azuread.outputs.GetDomainsResult; import com.pulumi.azuread.outputs.GetGroupResult; import com.pulumi.azuread.outputs.GetGroupsResult; +import com.pulumi.azuread.outputs.GetNamedLocationResult; import com.pulumi.azuread.outputs.GetServicePrincipalResult; import com.pulumi.azuread.outputs.GetServicePrincipalsResult; import com.pulumi.azuread.outputs.GetUserResult; @@ -3471,6 +3475,264 @@ public static Output getDirectoryObject(GetDirectoryOb public static CompletableFuture getDirectoryObjectPlain(GetDirectoryObjectPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("azuread:index/getDirectoryObject:getDirectoryObject", TypeShape.of(GetDirectoryObjectResult.class), args, Utilities.withVersion(options)); } + /** + * Use this data source to access information about directory role templates within Azure Active Directory. + * + * ## API Permissions + * + * The following API permissions are required in order to use this resource. + * + * When authenticated with a service principal, this resource requires one of the following application roles: `RoleManagement.Read.Directory` or `Directory.Read.All` + * + * When authenticated with a user principal, this data source does not require any additional roles. + * + * ## Example Usage + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.azuread.AzureadFunctions; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * final var current = AzureadFunctions.getDirectoryRoleTemplates(); + * + * ctx.export("roles", current.applyValue(getDirectoryRoleTemplatesResult -> getDirectoryRoleTemplatesResult.objectIds())); + * } + * } + * ``` + * + */ + public static Output getDirectoryRoleTemplates() { + return getDirectoryRoleTemplates(InvokeArgs.Empty, InvokeOptions.Empty); + } + /** + * Use this data source to access information about directory role templates within Azure Active Directory. + * + * ## API Permissions + * + * The following API permissions are required in order to use this resource. + * + * When authenticated with a service principal, this resource requires one of the following application roles: `RoleManagement.Read.Directory` or `Directory.Read.All` + * + * When authenticated with a user principal, this data source does not require any additional roles. + * + * ## Example Usage + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.azuread.AzureadFunctions; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * final var current = AzureadFunctions.getDirectoryRoleTemplates(); + * + * ctx.export("roles", current.applyValue(getDirectoryRoleTemplatesResult -> getDirectoryRoleTemplatesResult.objectIds())); + * } + * } + * ``` + * + */ + public static CompletableFuture getDirectoryRoleTemplatesPlain() { + return getDirectoryRoleTemplatesPlain(InvokeArgs.Empty, InvokeOptions.Empty); + } + /** + * Use this data source to access information about directory role templates within Azure Active Directory. + * + * ## API Permissions + * + * The following API permissions are required in order to use this resource. + * + * When authenticated with a service principal, this resource requires one of the following application roles: `RoleManagement.Read.Directory` or `Directory.Read.All` + * + * When authenticated with a user principal, this data source does not require any additional roles. + * + * ## Example Usage + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.azuread.AzureadFunctions; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * final var current = AzureadFunctions.getDirectoryRoleTemplates(); + * + * ctx.export("roles", current.applyValue(getDirectoryRoleTemplatesResult -> getDirectoryRoleTemplatesResult.objectIds())); + * } + * } + * ``` + * + */ + public static Output getDirectoryRoleTemplates(InvokeArgs args) { + return getDirectoryRoleTemplates(args, InvokeOptions.Empty); + } + /** + * Use this data source to access information about directory role templates within Azure Active Directory. + * + * ## API Permissions + * + * The following API permissions are required in order to use this resource. + * + * When authenticated with a service principal, this resource requires one of the following application roles: `RoleManagement.Read.Directory` or `Directory.Read.All` + * + * When authenticated with a user principal, this data source does not require any additional roles. + * + * ## Example Usage + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.azuread.AzureadFunctions; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * final var current = AzureadFunctions.getDirectoryRoleTemplates(); + * + * ctx.export("roles", current.applyValue(getDirectoryRoleTemplatesResult -> getDirectoryRoleTemplatesResult.objectIds())); + * } + * } + * ``` + * + */ + public static CompletableFuture getDirectoryRoleTemplatesPlain(InvokeArgs args) { + return getDirectoryRoleTemplatesPlain(args, InvokeOptions.Empty); + } + /** + * Use this data source to access information about directory role templates within Azure Active Directory. + * + * ## API Permissions + * + * The following API permissions are required in order to use this resource. + * + * When authenticated with a service principal, this resource requires one of the following application roles: `RoleManagement.Read.Directory` or `Directory.Read.All` + * + * When authenticated with a user principal, this data source does not require any additional roles. + * + * ## Example Usage + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.azuread.AzureadFunctions; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * final var current = AzureadFunctions.getDirectoryRoleTemplates(); + * + * ctx.export("roles", current.applyValue(getDirectoryRoleTemplatesResult -> getDirectoryRoleTemplatesResult.objectIds())); + * } + * } + * ``` + * + */ + public static Output getDirectoryRoleTemplates(InvokeArgs args, InvokeOptions options) { + return Deployment.getInstance().invoke("azuread:index/getDirectoryRoleTemplates:getDirectoryRoleTemplates", TypeShape.of(GetDirectoryRoleTemplatesResult.class), args, Utilities.withVersion(options)); + } + /** + * Use this data source to access information about directory role templates within Azure Active Directory. + * + * ## API Permissions + * + * The following API permissions are required in order to use this resource. + * + * When authenticated with a service principal, this resource requires one of the following application roles: `RoleManagement.Read.Directory` or `Directory.Read.All` + * + * When authenticated with a user principal, this data source does not require any additional roles. + * + * ## Example Usage + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.azuread.AzureadFunctions; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * final var current = AzureadFunctions.getDirectoryRoleTemplates(); + * + * ctx.export("roles", current.applyValue(getDirectoryRoleTemplatesResult -> getDirectoryRoleTemplatesResult.objectIds())); + * } + * } + * ``` + * + */ + public static CompletableFuture getDirectoryRoleTemplatesPlain(InvokeArgs args, InvokeOptions options) { + return Deployment.getInstance().invokeAsync("azuread:index/getDirectoryRoleTemplates:getDirectoryRoleTemplates", TypeShape.of(GetDirectoryRoleTemplatesResult.class), args, Utilities.withVersion(options)); + } /** * Use this data source to access information about activated directory roles within Azure Active Directory. * @@ -5307,6 +5569,270 @@ public static Output getGroups(GetGroupsArgs args, InvokeOption public static CompletableFuture getGroupsPlain(GetGroupsPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("azuread:index/getGroups:getGroups", TypeShape.of(GetGroupsResult.class), args, Utilities.withVersion(options)); } + /** + * Gets information about a Named Location within Azure Active Directory. + * + * ## API Permissions + * + * The following API permissions are required in order to use this data source. + * + * When authenticated with a service principal, this resource requires the following application roles: `Policy.Read.All` + * + * When authenticated with a user principal, this resource requires one of the following directory roles: `Conditional Access Administrator` or `Global Reader` + * + * ## Example Usage + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.azuread.AzureadFunctions; + * import com.pulumi.azuread.inputs.GetNamedLocationArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * final var example = AzureadFunctions.getNamedLocation(GetNamedLocationArgs.builder() + * .displayName("My Named Location") + * .build()); + * + * } + * } + * ``` + * ## Attributes Reference + * + * The following attributes are exported: + * + * * `country` - A `country` block as documented below, which describes a country-based named location. + * * `id` - The ID of the named location. + * * `ip` - An `ip` block as documented below, which describes an IP-based named location. + * * + * *** + * + * `country` block exports the following: + * + * * `countries_and_regions` - List of countries and/or regions in two-letter format specified by ISO 3166-2. + * * `include_unknown_countries_and_regions` - Whether IP addresses that don't map to a country or region are included in the named location. + * + * *** + * + * `ip` block exports the following: + * + * * `ip_ranges` - List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. + * * `trusted` - Whether the named location is trusted. + * + */ + public static Output getNamedLocation(GetNamedLocationArgs args) { + return getNamedLocation(args, InvokeOptions.Empty); + } + /** + * Gets information about a Named Location within Azure Active Directory. + * + * ## API Permissions + * + * The following API permissions are required in order to use this data source. + * + * When authenticated with a service principal, this resource requires the following application roles: `Policy.Read.All` + * + * When authenticated with a user principal, this resource requires one of the following directory roles: `Conditional Access Administrator` or `Global Reader` + * + * ## Example Usage + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.azuread.AzureadFunctions; + * import com.pulumi.azuread.inputs.GetNamedLocationArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * final var example = AzureadFunctions.getNamedLocation(GetNamedLocationArgs.builder() + * .displayName("My Named Location") + * .build()); + * + * } + * } + * ``` + * ## Attributes Reference + * + * The following attributes are exported: + * + * * `country` - A `country` block as documented below, which describes a country-based named location. + * * `id` - The ID of the named location. + * * `ip` - An `ip` block as documented below, which describes an IP-based named location. + * * + * *** + * + * `country` block exports the following: + * + * * `countries_and_regions` - List of countries and/or regions in two-letter format specified by ISO 3166-2. + * * `include_unknown_countries_and_regions` - Whether IP addresses that don't map to a country or region are included in the named location. + * + * *** + * + * `ip` block exports the following: + * + * * `ip_ranges` - List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. + * * `trusted` - Whether the named location is trusted. + * + */ + public static CompletableFuture getNamedLocationPlain(GetNamedLocationPlainArgs args) { + return getNamedLocationPlain(args, InvokeOptions.Empty); + } + /** + * Gets information about a Named Location within Azure Active Directory. + * + * ## API Permissions + * + * The following API permissions are required in order to use this data source. + * + * When authenticated with a service principal, this resource requires the following application roles: `Policy.Read.All` + * + * When authenticated with a user principal, this resource requires one of the following directory roles: `Conditional Access Administrator` or `Global Reader` + * + * ## Example Usage + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.azuread.AzureadFunctions; + * import com.pulumi.azuread.inputs.GetNamedLocationArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * final var example = AzureadFunctions.getNamedLocation(GetNamedLocationArgs.builder() + * .displayName("My Named Location") + * .build()); + * + * } + * } + * ``` + * ## Attributes Reference + * + * The following attributes are exported: + * + * * `country` - A `country` block as documented below, which describes a country-based named location. + * * `id` - The ID of the named location. + * * `ip` - An `ip` block as documented below, which describes an IP-based named location. + * * + * *** + * + * `country` block exports the following: + * + * * `countries_and_regions` - List of countries and/or regions in two-letter format specified by ISO 3166-2. + * * `include_unknown_countries_and_regions` - Whether IP addresses that don't map to a country or region are included in the named location. + * + * *** + * + * `ip` block exports the following: + * + * * `ip_ranges` - List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. + * * `trusted` - Whether the named location is trusted. + * + */ + public static Output getNamedLocation(GetNamedLocationArgs args, InvokeOptions options) { + return Deployment.getInstance().invoke("azuread:index/getNamedLocation:getNamedLocation", TypeShape.of(GetNamedLocationResult.class), args, Utilities.withVersion(options)); + } + /** + * Gets information about a Named Location within Azure Active Directory. + * + * ## API Permissions + * + * The following API permissions are required in order to use this data source. + * + * When authenticated with a service principal, this resource requires the following application roles: `Policy.Read.All` + * + * When authenticated with a user principal, this resource requires one of the following directory roles: `Conditional Access Administrator` or `Global Reader` + * + * ## Example Usage + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.azuread.AzureadFunctions; + * import com.pulumi.azuread.inputs.GetNamedLocationArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * final var example = AzureadFunctions.getNamedLocation(GetNamedLocationArgs.builder() + * .displayName("My Named Location") + * .build()); + * + * } + * } + * ``` + * ## Attributes Reference + * + * The following attributes are exported: + * + * * `country` - A `country` block as documented below, which describes a country-based named location. + * * `id` - The ID of the named location. + * * `ip` - An `ip` block as documented below, which describes an IP-based named location. + * * + * *** + * + * `country` block exports the following: + * + * * `countries_and_regions` - List of countries and/or regions in two-letter format specified by ISO 3166-2. + * * `include_unknown_countries_and_regions` - Whether IP addresses that don't map to a country or region are included in the named location. + * + * *** + * + * `ip` block exports the following: + * + * * `ip_ranges` - List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. + * * `trusted` - Whether the named location is trusted. + * + */ + public static CompletableFuture getNamedLocationPlain(GetNamedLocationPlainArgs args, InvokeOptions options) { + return Deployment.getInstance().invokeAsync("azuread:index/getNamedLocation:getNamedLocation", TypeShape.of(GetNamedLocationResult.class), args, Utilities.withVersion(options)); + } /** * Gets information about an existing service principal associated with an application within Azure Active Directory. * diff --git a/sdk/java/src/main/java/com/pulumi/azuread/ConditionalAccessPolicy.java b/sdk/java/src/main/java/com/pulumi/azuread/ConditionalAccessPolicy.java index c9af8e0ce..809498e9e 100644 --- a/sdk/java/src/main/java/com/pulumi/azuread/ConditionalAccessPolicy.java +++ b/sdk/java/src/main/java/com/pulumi/azuread/ConditionalAccessPolicy.java @@ -263,18 +263,20 @@ public Output displayName() { * */ @Export(name="grantControls", type=ConditionalAccessPolicyGrantControls.class, parameters={}) - private Output grantControls; + private Output grantControls; /** * @return A `grant_controls` block as documented below, which specifies the grant controls that must be fulfilled to pass the policy. * */ - public Output grantControls() { - return this.grantControls; + public Output> grantControls() { + return Codegen.optional(this.grantControls); } /** * A `session_controls` block as documented below, which specifies the session controls that are enforced after sign-in. * + * > Note: At least one of `grant_controls` and/or `session_controls` blocks must be specified. + * */ @Export(name="sessionControls", type=ConditionalAccessPolicySessionControls.class, parameters={}) private Output sessionControls; @@ -282,6 +284,8 @@ public Output grantControls() { /** * @return A `session_controls` block as documented below, which specifies the session controls that are enforced after sign-in. * + * > Note: At least one of `grant_controls` and/or `session_controls` blocks must be specified. + * */ public Output> sessionControls() { return Codegen.optional(this.sessionControls); diff --git a/sdk/java/src/main/java/com/pulumi/azuread/ConditionalAccessPolicyArgs.java b/sdk/java/src/main/java/com/pulumi/azuread/ConditionalAccessPolicyArgs.java index 51ec01c4a..dfd3a78c7 100644 --- a/sdk/java/src/main/java/com/pulumi/azuread/ConditionalAccessPolicyArgs.java +++ b/sdk/java/src/main/java/com/pulumi/azuread/ConditionalAccessPolicyArgs.java @@ -52,20 +52,22 @@ public Output displayName() { * A `grant_controls` block as documented below, which specifies the grant controls that must be fulfilled to pass the policy. * */ - @Import(name="grantControls", required=true) - private Output grantControls; + @Import(name="grantControls") + private @Nullable Output grantControls; /** * @return A `grant_controls` block as documented below, which specifies the grant controls that must be fulfilled to pass the policy. * */ - public Output grantControls() { - return this.grantControls; + public Optional> grantControls() { + return Optional.ofNullable(this.grantControls); } /** * A `session_controls` block as documented below, which specifies the session controls that are enforced after sign-in. * + * > Note: At least one of `grant_controls` and/or `session_controls` blocks must be specified. + * */ @Import(name="sessionControls") private @Nullable Output sessionControls; @@ -73,6 +75,8 @@ public Output grantControls() { /** * @return A `session_controls` block as documented below, which specifies the session controls that are enforced after sign-in. * + * > Note: At least one of `grant_controls` and/or `session_controls` blocks must be specified. + * */ public Optional> sessionControls() { return Optional.ofNullable(this.sessionControls); @@ -169,7 +173,7 @@ public Builder displayName(String displayName) { * @return builder * */ - public Builder grantControls(Output grantControls) { + public Builder grantControls(@Nullable Output grantControls) { $.grantControls = grantControls; return this; } @@ -187,6 +191,8 @@ public Builder grantControls(ConditionalAccessPolicyGrantControlsArgs grantContr /** * @param sessionControls A `session_controls` block as documented below, which specifies the session controls that are enforced after sign-in. * + * > Note: At least one of `grant_controls` and/or `session_controls` blocks must be specified. + * * @return builder * */ @@ -198,6 +204,8 @@ public Builder sessionControls(@Nullable Output> reviewFrequency() { } /** - * Self review or specific reviewers. Valid values are `Self`, or `Reviewers`. + * Self-review or specific reviewers. Valid values are `Manager`, `Reviewers`, or `Self`. * */ @Import(name="reviewType") private @Nullable Output reviewType; /** - * @return Self review or specific reviewers. Valid values are `Self`, or `Reviewers`. + * @return Self-review or specific reviewers. Valid values are `Manager`, `Reviewers`, or `Self`. * */ public Optional> reviewType() { @@ -313,7 +313,7 @@ public Builder reviewFrequency(String reviewFrequency) { } /** - * @param reviewType Self review or specific reviewers. Valid values are `Self`, or `Reviewers`. + * @param reviewType Self-review or specific reviewers. Valid values are `Manager`, `Reviewers`, or `Self`. * * @return builder * @@ -324,7 +324,7 @@ public Builder reviewType(@Nullable Output reviewType) { } /** - * @param reviewType Self review or specific reviewers. Valid values are `Self`, or `Reviewers`. + * @param reviewType Self-review or specific reviewers. Valid values are `Manager`, `Reviewers`, or `Self`. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/azuread/inputs/ConditionalAccessPolicyConditionsArgs.java b/sdk/java/src/main/java/com/pulumi/azuread/inputs/ConditionalAccessPolicyConditionsArgs.java index cba21b928..f45e8523d 100644 --- a/sdk/java/src/main/java/com/pulumi/azuread/inputs/ConditionalAccessPolicyConditionsArgs.java +++ b/sdk/java/src/main/java/com/pulumi/azuread/inputs/ConditionalAccessPolicyConditionsArgs.java @@ -113,14 +113,29 @@ public Optional> platform } /** - * A list of sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. + * A list of service principal sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `none`, `unknownFutureValue`. + * + */ + @Import(name="servicePrincipalRiskLevels") + private @Nullable Output> servicePrincipalRiskLevels; + + /** + * @return A list of service principal sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `none`, `unknownFutureValue`. + * + */ + public Optional>> servicePrincipalRiskLevels() { + return Optional.ofNullable(this.servicePrincipalRiskLevels); + } + + /** + * A list of user sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. * */ @Import(name="signInRiskLevels") private @Nullable Output> signInRiskLevels; /** - * @return A list of sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. + * @return A list of user sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. * */ public Optional>> signInRiskLevels() { @@ -166,6 +181,7 @@ private ConditionalAccessPolicyConditionsArgs(ConditionalAccessPolicyConditionsA this.devices = $.devices; this.locations = $.locations; this.platforms = $.platforms; + this.servicePrincipalRiskLevels = $.servicePrincipalRiskLevels; this.signInRiskLevels = $.signInRiskLevels; this.userRiskLevels = $.userRiskLevels; this.users = $.users; @@ -326,7 +342,38 @@ public Builder platforms(ConditionalAccessPolicyConditionsPlatformsArgs platform } /** - * @param signInRiskLevels A list of sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. + * @param servicePrincipalRiskLevels A list of service principal sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `none`, `unknownFutureValue`. + * + * @return builder + * + */ + public Builder servicePrincipalRiskLevels(@Nullable Output> servicePrincipalRiskLevels) { + $.servicePrincipalRiskLevels = servicePrincipalRiskLevels; + return this; + } + + /** + * @param servicePrincipalRiskLevels A list of service principal sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `none`, `unknownFutureValue`. + * + * @return builder + * + */ + public Builder servicePrincipalRiskLevels(List servicePrincipalRiskLevels) { + return servicePrincipalRiskLevels(Output.of(servicePrincipalRiskLevels)); + } + + /** + * @param servicePrincipalRiskLevels A list of service principal sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `none`, `unknownFutureValue`. + * + * @return builder + * + */ + public Builder servicePrincipalRiskLevels(String... servicePrincipalRiskLevels) { + return servicePrincipalRiskLevels(List.of(servicePrincipalRiskLevels)); + } + + /** + * @param signInRiskLevels A list of user sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. * * @return builder * @@ -337,7 +384,7 @@ public Builder signInRiskLevels(@Nullable Output> signInRiskLevels) } /** - * @param signInRiskLevels A list of sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. + * @param signInRiskLevels A list of user sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. * * @return builder * @@ -347,7 +394,7 @@ public Builder signInRiskLevels(List signInRiskLevels) { } /** - * @param signInRiskLevels A list of sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. + * @param signInRiskLevels A list of user sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/azuread/inputs/ConditionalAccessPolicyState.java b/sdk/java/src/main/java/com/pulumi/azuread/inputs/ConditionalAccessPolicyState.java index 0221c2127..69d0da743 100644 --- a/sdk/java/src/main/java/com/pulumi/azuread/inputs/ConditionalAccessPolicyState.java +++ b/sdk/java/src/main/java/com/pulumi/azuread/inputs/ConditionalAccessPolicyState.java @@ -66,6 +66,8 @@ public Optional> grantControls( /** * A `session_controls` block as documented below, which specifies the session controls that are enforced after sign-in. * + * > Note: At least one of `grant_controls` and/or `session_controls` blocks must be specified. + * */ @Import(name="sessionControls") private @Nullable Output sessionControls; @@ -73,6 +75,8 @@ public Optional> grantControls( /** * @return A `session_controls` block as documented below, which specifies the session controls that are enforced after sign-in. * + * > Note: At least one of `grant_controls` and/or `session_controls` blocks must be specified. + * */ public Optional> sessionControls() { return Optional.ofNullable(this.sessionControls); @@ -187,6 +191,8 @@ public Builder grantControls(ConditionalAccessPolicyGrantControlsArgs grantContr /** * @param sessionControls A `session_controls` block as documented below, which specifies the session controls that are enforced after sign-in. * + * > Note: At least one of `grant_controls` and/or `session_controls` blocks must be specified. + * * @return builder * */ @@ -198,6 +204,8 @@ public Builder sessionControls(@Nullable Output displayName; + + /** + * @return Specifies the display named of the named location to look up. + * + */ + public Output displayName() { + return this.displayName; + } + + private GetNamedLocationArgs() {} + + private GetNamedLocationArgs(GetNamedLocationArgs $) { + this.displayName = $.displayName; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GetNamedLocationArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GetNamedLocationArgs $; + + public Builder() { + $ = new GetNamedLocationArgs(); + } + + public Builder(GetNamedLocationArgs defaults) { + $ = new GetNamedLocationArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param displayName Specifies the display named of the named location to look up. + * + * @return builder + * + */ + public Builder displayName(Output displayName) { + $.displayName = displayName; + return this; + } + + /** + * @param displayName Specifies the display named of the named location to look up. + * + * @return builder + * + */ + public Builder displayName(String displayName) { + return displayName(Output.of(displayName)); + } + + public GetNamedLocationArgs build() { + $.displayName = Objects.requireNonNull($.displayName, "expected parameter 'displayName' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/azuread/inputs/GetNamedLocationPlainArgs.java b/sdk/java/src/main/java/com/pulumi/azuread/inputs/GetNamedLocationPlainArgs.java new file mode 100644 index 000000000..270b324b5 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/azuread/inputs/GetNamedLocationPlainArgs.java @@ -0,0 +1,71 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.azuread.inputs; + +import com.pulumi.core.annotations.Import; +import java.lang.String; +import java.util.Objects; + + +public final class GetNamedLocationPlainArgs extends com.pulumi.resources.InvokeArgs { + + public static final GetNamedLocationPlainArgs Empty = new GetNamedLocationPlainArgs(); + + /** + * Specifies the display named of the named location to look up. + * + */ + @Import(name="displayName", required=true) + private String displayName; + + /** + * @return Specifies the display named of the named location to look up. + * + */ + public String displayName() { + return this.displayName; + } + + private GetNamedLocationPlainArgs() {} + + private GetNamedLocationPlainArgs(GetNamedLocationPlainArgs $) { + this.displayName = $.displayName; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GetNamedLocationPlainArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GetNamedLocationPlainArgs $; + + public Builder() { + $ = new GetNamedLocationPlainArgs(); + } + + public Builder(GetNamedLocationPlainArgs defaults) { + $ = new GetNamedLocationPlainArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param displayName Specifies the display named of the named location to look up. + * + * @return builder + * + */ + public Builder displayName(String displayName) { + $.displayName = displayName; + return this; + } + + public GetNamedLocationPlainArgs build() { + $.displayName = Objects.requireNonNull($.displayName, "expected parameter 'displayName' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/azuread/inputs/NamedLocationIpArgs.java b/sdk/java/src/main/java/com/pulumi/azuread/inputs/NamedLocationIpArgs.java index 0e686431d..908f61e60 100644 --- a/sdk/java/src/main/java/com/pulumi/azuread/inputs/NamedLocationIpArgs.java +++ b/sdk/java/src/main/java/com/pulumi/azuread/inputs/NamedLocationIpArgs.java @@ -18,14 +18,14 @@ public final class NamedLocationIpArgs extends com.pulumi.resources.ResourceArgs public static final NamedLocationIpArgs Empty = new NamedLocationIpArgs(); /** - * List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596. + * List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. * */ @Import(name="ipRanges", required=true) private Output> ipRanges; /** - * @return List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596. + * @return List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. * */ public Output> ipRanges() { @@ -73,7 +73,7 @@ public Builder(NamedLocationIpArgs defaults) { } /** - * @param ipRanges List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596. + * @param ipRanges List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. * * @return builder * @@ -84,7 +84,7 @@ public Builder ipRanges(Output> ipRanges) { } /** - * @param ipRanges List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596. + * @param ipRanges List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. * * @return builder * @@ -94,7 +94,7 @@ public Builder ipRanges(List ipRanges) { } /** - * @param ipRanges List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596. + * @param ipRanges List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/azuread/outputs/AccessPackageAssignmentPolicyAssignmentReviewSettings.java b/sdk/java/src/main/java/com/pulumi/azuread/outputs/AccessPackageAssignmentPolicyAssignmentReviewSettings.java index 4f3e44fbe..22a0943a2 100644 --- a/sdk/java/src/main/java/com/pulumi/azuread/outputs/AccessPackageAssignmentPolicyAssignmentReviewSettings.java +++ b/sdk/java/src/main/java/com/pulumi/azuread/outputs/AccessPackageAssignmentPolicyAssignmentReviewSettings.java @@ -46,7 +46,7 @@ public final class AccessPackageAssignmentPolicyAssignmentReviewSettings { */ private @Nullable String reviewFrequency; /** - * @return Self review or specific reviewers. Valid values are `Self`, or `Reviewers`. + * @return Self-review or specific reviewers. Valid values are `Manager`, `Reviewers`, or `Self`. * */ private @Nullable String reviewType; @@ -105,7 +105,7 @@ public Optional reviewFrequency() { return Optional.ofNullable(this.reviewFrequency); } /** - * @return Self review or specific reviewers. Valid values are `Self`, or `Reviewers`. + * @return Self-review or specific reviewers. Valid values are `Manager`, `Reviewers`, or `Self`. * */ public Optional reviewType() { diff --git a/sdk/java/src/main/java/com/pulumi/azuread/outputs/ConditionalAccessPolicyConditions.java b/sdk/java/src/main/java/com/pulumi/azuread/outputs/ConditionalAccessPolicyConditions.java index 82d629a17..929fd262b 100644 --- a/sdk/java/src/main/java/com/pulumi/azuread/outputs/ConditionalAccessPolicyConditions.java +++ b/sdk/java/src/main/java/com/pulumi/azuread/outputs/ConditionalAccessPolicyConditions.java @@ -49,7 +49,12 @@ public final class ConditionalAccessPolicyConditions { */ private @Nullable ConditionalAccessPolicyConditionsPlatforms platforms; /** - * @return A list of sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. + * @return A list of service principal sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `none`, `unknownFutureValue`. + * + */ + private @Nullable List servicePrincipalRiskLevels; + /** + * @return A list of user sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. * */ private @Nullable List signInRiskLevels; @@ -108,7 +113,14 @@ public Optional platforms() { return Optional.ofNullable(this.platforms); } /** - * @return A list of sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. + * @return A list of service principal sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `none`, `unknownFutureValue`. + * + */ + public List servicePrincipalRiskLevels() { + return this.servicePrincipalRiskLevels == null ? List.of() : this.servicePrincipalRiskLevels; + } + /** + * @return A list of user sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. * */ public List signInRiskLevels() { @@ -144,6 +156,7 @@ public static final class Builder { private @Nullable ConditionalAccessPolicyConditionsDevices devices; private @Nullable ConditionalAccessPolicyConditionsLocations locations; private @Nullable ConditionalAccessPolicyConditionsPlatforms platforms; + private @Nullable List servicePrincipalRiskLevels; private @Nullable List signInRiskLevels; private @Nullable List userRiskLevels; private ConditionalAccessPolicyConditionsUsers users; @@ -156,6 +169,7 @@ public Builder(ConditionalAccessPolicyConditions defaults) { this.devices = defaults.devices; this.locations = defaults.locations; this.platforms = defaults.platforms; + this.servicePrincipalRiskLevels = defaults.servicePrincipalRiskLevels; this.signInRiskLevels = defaults.signInRiskLevels; this.userRiskLevels = defaults.userRiskLevels; this.users = defaults.users; @@ -195,6 +209,14 @@ public Builder platforms(@Nullable ConditionalAccessPolicyConditionsPlatforms pl return this; } @CustomType.Setter + public Builder servicePrincipalRiskLevels(@Nullable List servicePrincipalRiskLevels) { + this.servicePrincipalRiskLevels = servicePrincipalRiskLevels; + return this; + } + public Builder servicePrincipalRiskLevels(String... servicePrincipalRiskLevels) { + return servicePrincipalRiskLevels(List.of(servicePrincipalRiskLevels)); + } + @CustomType.Setter public Builder signInRiskLevels(@Nullable List signInRiskLevels) { this.signInRiskLevels = signInRiskLevels; return this; @@ -223,6 +245,7 @@ public ConditionalAccessPolicyConditions build() { o.devices = devices; o.locations = locations; o.platforms = platforms; + o.servicePrincipalRiskLevels = servicePrincipalRiskLevels; o.signInRiskLevels = signInRiskLevels; o.userRiskLevels = userRiskLevels; o.users = users; diff --git a/sdk/java/src/main/java/com/pulumi/azuread/outputs/GetDirectoryRoleTemplatesResult.java b/sdk/java/src/main/java/com/pulumi/azuread/outputs/GetDirectoryRoleTemplatesResult.java new file mode 100644 index 000000000..7a6c08cb3 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/azuread/outputs/GetDirectoryRoleTemplatesResult.java @@ -0,0 +1,102 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.azuread.outputs; + +import com.pulumi.azuread.outputs.GetDirectoryRoleTemplatesRoleTemplate; +import com.pulumi.core.annotations.CustomType; +import java.lang.String; +import java.util.List; +import java.util.Objects; + +@CustomType +public final class GetDirectoryRoleTemplatesResult { + /** + * @return The provider-assigned unique ID for this managed resource. + * + */ + private String id; + /** + * @return The object IDs of the role templates. + * + */ + private List objectIds; + /** + * @return A list of role templates. Each `role_template` object provides the attributes documented below. + * + */ + private List roleTemplates; + + private GetDirectoryRoleTemplatesResult() {} + /** + * @return The provider-assigned unique ID for this managed resource. + * + */ + public String id() { + return this.id; + } + /** + * @return The object IDs of the role templates. + * + */ + public List objectIds() { + return this.objectIds; + } + /** + * @return A list of role templates. Each `role_template` object provides the attributes documented below. + * + */ + public List roleTemplates() { + return this.roleTemplates; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(GetDirectoryRoleTemplatesResult defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private String id; + private List objectIds; + private List roleTemplates; + public Builder() {} + public Builder(GetDirectoryRoleTemplatesResult defaults) { + Objects.requireNonNull(defaults); + this.id = defaults.id; + this.objectIds = defaults.objectIds; + this.roleTemplates = defaults.roleTemplates; + } + + @CustomType.Setter + public Builder id(String id) { + this.id = Objects.requireNonNull(id); + return this; + } + @CustomType.Setter + public Builder objectIds(List objectIds) { + this.objectIds = Objects.requireNonNull(objectIds); + return this; + } + public Builder objectIds(String... objectIds) { + return objectIds(List.of(objectIds)); + } + @CustomType.Setter + public Builder roleTemplates(List roleTemplates) { + this.roleTemplates = Objects.requireNonNull(roleTemplates); + return this; + } + public Builder roleTemplates(GetDirectoryRoleTemplatesRoleTemplate... roleTemplates) { + return roleTemplates(List.of(roleTemplates)); + } + public GetDirectoryRoleTemplatesResult build() { + final var o = new GetDirectoryRoleTemplatesResult(); + o.id = id; + o.objectIds = objectIds; + o.roleTemplates = roleTemplates; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/azuread/outputs/GetDirectoryRoleTemplatesRoleTemplate.java b/sdk/java/src/main/java/com/pulumi/azuread/outputs/GetDirectoryRoleTemplatesRoleTemplate.java new file mode 100644 index 000000000..8a479799a --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/azuread/outputs/GetDirectoryRoleTemplatesRoleTemplate.java @@ -0,0 +1,94 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.azuread.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.String; +import java.util.Objects; + +@CustomType +public final class GetDirectoryRoleTemplatesRoleTemplate { + /** + * @return The description of the directory role template. + * + */ + private String description; + /** + * @return The display name of the directory role template. + * + */ + private String displayName; + /** + * @return The object ID of the directory role template. + * + */ + private String objectId; + + private GetDirectoryRoleTemplatesRoleTemplate() {} + /** + * @return The description of the directory role template. + * + */ + public String description() { + return this.description; + } + /** + * @return The display name of the directory role template. + * + */ + public String displayName() { + return this.displayName; + } + /** + * @return The object ID of the directory role template. + * + */ + public String objectId() { + return this.objectId; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(GetDirectoryRoleTemplatesRoleTemplate defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private String description; + private String displayName; + private String objectId; + public Builder() {} + public Builder(GetDirectoryRoleTemplatesRoleTemplate defaults) { + Objects.requireNonNull(defaults); + this.description = defaults.description; + this.displayName = defaults.displayName; + this.objectId = defaults.objectId; + } + + @CustomType.Setter + public Builder description(String description) { + this.description = Objects.requireNonNull(description); + return this; + } + @CustomType.Setter + public Builder displayName(String displayName) { + this.displayName = Objects.requireNonNull(displayName); + return this; + } + @CustomType.Setter + public Builder objectId(String objectId) { + this.objectId = Objects.requireNonNull(objectId); + return this; + } + public GetDirectoryRoleTemplatesRoleTemplate build() { + final var o = new GetDirectoryRoleTemplatesRoleTemplate(); + o.description = description; + o.displayName = displayName; + o.objectId = objectId; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/azuread/outputs/GetNamedLocationCountry.java b/sdk/java/src/main/java/com/pulumi/azuread/outputs/GetNamedLocationCountry.java new file mode 100644 index 000000000..138423de1 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/azuread/outputs/GetNamedLocationCountry.java @@ -0,0 +1,63 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.azuread.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.Boolean; +import java.lang.String; +import java.util.List; +import java.util.Objects; + +@CustomType +public final class GetNamedLocationCountry { + private List countriesAndRegions; + private Boolean includeUnknownCountriesAndRegions; + + private GetNamedLocationCountry() {} + public List countriesAndRegions() { + return this.countriesAndRegions; + } + public Boolean includeUnknownCountriesAndRegions() { + return this.includeUnknownCountriesAndRegions; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(GetNamedLocationCountry defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private List countriesAndRegions; + private Boolean includeUnknownCountriesAndRegions; + public Builder() {} + public Builder(GetNamedLocationCountry defaults) { + Objects.requireNonNull(defaults); + this.countriesAndRegions = defaults.countriesAndRegions; + this.includeUnknownCountriesAndRegions = defaults.includeUnknownCountriesAndRegions; + } + + @CustomType.Setter + public Builder countriesAndRegions(List countriesAndRegions) { + this.countriesAndRegions = Objects.requireNonNull(countriesAndRegions); + return this; + } + public Builder countriesAndRegions(String... countriesAndRegions) { + return countriesAndRegions(List.of(countriesAndRegions)); + } + @CustomType.Setter + public Builder includeUnknownCountriesAndRegions(Boolean includeUnknownCountriesAndRegions) { + this.includeUnknownCountriesAndRegions = Objects.requireNonNull(includeUnknownCountriesAndRegions); + return this; + } + public GetNamedLocationCountry build() { + final var o = new GetNamedLocationCountry(); + o.countriesAndRegions = countriesAndRegions; + o.includeUnknownCountriesAndRegions = includeUnknownCountriesAndRegions; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/azuread/outputs/GetNamedLocationIp.java b/sdk/java/src/main/java/com/pulumi/azuread/outputs/GetNamedLocationIp.java new file mode 100644 index 000000000..92f9dc5da --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/azuread/outputs/GetNamedLocationIp.java @@ -0,0 +1,63 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.azuread.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.Boolean; +import java.lang.String; +import java.util.List; +import java.util.Objects; + +@CustomType +public final class GetNamedLocationIp { + private List ipRanges; + private Boolean trusted; + + private GetNamedLocationIp() {} + public List ipRanges() { + return this.ipRanges; + } + public Boolean trusted() { + return this.trusted; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(GetNamedLocationIp defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private List ipRanges; + private Boolean trusted; + public Builder() {} + public Builder(GetNamedLocationIp defaults) { + Objects.requireNonNull(defaults); + this.ipRanges = defaults.ipRanges; + this.trusted = defaults.trusted; + } + + @CustomType.Setter + public Builder ipRanges(List ipRanges) { + this.ipRanges = Objects.requireNonNull(ipRanges); + return this; + } + public Builder ipRanges(String... ipRanges) { + return ipRanges(List.of(ipRanges)); + } + @CustomType.Setter + public Builder trusted(Boolean trusted) { + this.trusted = Objects.requireNonNull(trusted); + return this; + } + public GetNamedLocationIp build() { + final var o = new GetNamedLocationIp(); + o.ipRanges = ipRanges; + o.trusted = trusted; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/azuread/outputs/GetNamedLocationResult.java b/sdk/java/src/main/java/com/pulumi/azuread/outputs/GetNamedLocationResult.java new file mode 100644 index 000000000..201cfd207 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/azuread/outputs/GetNamedLocationResult.java @@ -0,0 +1,99 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.azuread.outputs; + +import com.pulumi.azuread.outputs.GetNamedLocationCountry; +import com.pulumi.azuread.outputs.GetNamedLocationIp; +import com.pulumi.core.annotations.CustomType; +import java.lang.String; +import java.util.List; +import java.util.Objects; + +@CustomType +public final class GetNamedLocationResult { + private List countries; + private String displayName; + /** + * @return The provider-assigned unique ID for this managed resource. + * + */ + private String id; + private List ips; + + private GetNamedLocationResult() {} + public List countries() { + return this.countries; + } + public String displayName() { + return this.displayName; + } + /** + * @return The provider-assigned unique ID for this managed resource. + * + */ + public String id() { + return this.id; + } + public List ips() { + return this.ips; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(GetNamedLocationResult defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private List countries; + private String displayName; + private String id; + private List ips; + public Builder() {} + public Builder(GetNamedLocationResult defaults) { + Objects.requireNonNull(defaults); + this.countries = defaults.countries; + this.displayName = defaults.displayName; + this.id = defaults.id; + this.ips = defaults.ips; + } + + @CustomType.Setter + public Builder countries(List countries) { + this.countries = Objects.requireNonNull(countries); + return this; + } + public Builder countries(GetNamedLocationCountry... countries) { + return countries(List.of(countries)); + } + @CustomType.Setter + public Builder displayName(String displayName) { + this.displayName = Objects.requireNonNull(displayName); + return this; + } + @CustomType.Setter + public Builder id(String id) { + this.id = Objects.requireNonNull(id); + return this; + } + @CustomType.Setter + public Builder ips(List ips) { + this.ips = Objects.requireNonNull(ips); + return this; + } + public Builder ips(GetNamedLocationIp... ips) { + return ips(List.of(ips)); + } + public GetNamedLocationResult build() { + final var o = new GetNamedLocationResult(); + o.countries = countries; + o.displayName = displayName; + o.id = id; + o.ips = ips; + return o; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/azuread/outputs/NamedLocationIp.java b/sdk/java/src/main/java/com/pulumi/azuread/outputs/NamedLocationIp.java index 2734a08ee..478320fd9 100644 --- a/sdk/java/src/main/java/com/pulumi/azuread/outputs/NamedLocationIp.java +++ b/sdk/java/src/main/java/com/pulumi/azuread/outputs/NamedLocationIp.java @@ -14,7 +14,7 @@ @CustomType public final class NamedLocationIp { /** - * @return List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596. + * @return List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. * */ private List ipRanges; @@ -26,7 +26,7 @@ public final class NamedLocationIp { private NamedLocationIp() {} /** - * @return List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596. + * @return List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. * */ public List ipRanges() { diff --git a/sdk/nodejs/conditionalAccessPolicy.ts b/sdk/nodejs/conditionalAccessPolicy.ts index 62e6ef80e..f6bef4f9c 100644 --- a/sdk/nodejs/conditionalAccessPolicy.ts +++ b/sdk/nodejs/conditionalAccessPolicy.ts @@ -175,9 +175,11 @@ export class ConditionalAccessPolicy extends pulumi.CustomResource { /** * A `grantControls` block as documented below, which specifies the grant controls that must be fulfilled to pass the policy. */ - public readonly grantControls!: pulumi.Output; + public readonly grantControls!: pulumi.Output; /** * A `sessionControls` block as documented below, which specifies the session controls that are enforced after sign-in. + * + * > Note: At least one of `grantControls` and/or `sessionControls` blocks must be specified. */ public readonly sessionControls!: pulumi.Output; /** @@ -211,9 +213,6 @@ export class ConditionalAccessPolicy extends pulumi.CustomResource { if ((!args || args.displayName === undefined) && !opts.urn) { throw new Error("Missing required property 'displayName'"); } - if ((!args || args.grantControls === undefined) && !opts.urn) { - throw new Error("Missing required property 'grantControls'"); - } if ((!args || args.state === undefined) && !opts.urn) { throw new Error("Missing required property 'state'"); } @@ -246,6 +245,8 @@ export interface ConditionalAccessPolicyState { grantControls?: pulumi.Input; /** * A `sessionControls` block as documented below, which specifies the session controls that are enforced after sign-in. + * + * > Note: At least one of `grantControls` and/or `sessionControls` blocks must be specified. */ sessionControls?: pulumi.Input; /** @@ -269,9 +270,11 @@ export interface ConditionalAccessPolicyArgs { /** * A `grantControls` block as documented below, which specifies the grant controls that must be fulfilled to pass the policy. */ - grantControls: pulumi.Input; + grantControls?: pulumi.Input; /** * A `sessionControls` block as documented below, which specifies the session controls that are enforced after sign-in. + * + * > Note: At least one of `grantControls` and/or `sessionControls` blocks must be specified. */ sessionControls?: pulumi.Input; /** diff --git a/sdk/nodejs/getDirectoryRoleTemplates.ts b/sdk/nodejs/getDirectoryRoleTemplates.ts new file mode 100644 index 000000000..2d90e1d6c --- /dev/null +++ b/sdk/nodejs/getDirectoryRoleTemplates.ts @@ -0,0 +1,53 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; +import * as utilities from "./utilities"; + +/** + * Use this data source to access information about directory role templates within Azure Active Directory. + * + * ## API Permissions + * + * The following API permissions are required in order to use this resource. + * + * When authenticated with a service principal, this resource requires one of the following application roles: `RoleManagement.Read.Directory` or `Directory.Read.All` + * + * When authenticated with a user principal, this data source does not require any additional roles. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as azuread from "@pulumi/azuread"; + * + * const current = azuread.getDirectoryRoleTemplates({}); + * export const roles = current.then(current => current.objectIds); + * ``` + */ +export function getDirectoryRoleTemplates(opts?: pulumi.InvokeOptions): Promise { + + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("azuread:index/getDirectoryRoleTemplates:getDirectoryRoleTemplates", { + }, opts); +} + +/** + * A collection of values returned by getDirectoryRoleTemplates. + */ +export interface GetDirectoryRoleTemplatesResult { + /** + * The provider-assigned unique ID for this managed resource. + */ + readonly id: string; + /** + * The object IDs of the role templates. + */ + readonly objectIds: string[]; + /** + * A list of role templates. Each `roleTemplate` object provides the attributes documented below. + */ + readonly roleTemplates: outputs.GetDirectoryRoleTemplatesRoleTemplate[]; +} diff --git a/sdk/nodejs/getNamedLocation.ts b/sdk/nodejs/getNamedLocation.ts new file mode 100644 index 000000000..cd2b70eca --- /dev/null +++ b/sdk/nodejs/getNamedLocation.ts @@ -0,0 +1,137 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; +import * as utilities from "./utilities"; + +/** + * Gets information about a Named Location within Azure Active Directory. + * + * ## API Permissions + * + * The following API permissions are required in order to use this data source. + * + * When authenticated with a service principal, this resource requires the following application roles: `Policy.Read.All` + * + * When authenticated with a user principal, this resource requires one of the following directory roles: `Conditional Access Administrator` or `Global Reader` + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as azuread from "@pulumi/azuread"; + * + * const example = azuread.getNamedLocation({ + * displayName: "My Named Location", + * }); + * ``` + * ## Attributes Reference + * + * The following attributes are exported: + * + * * `country` - A `country` block as documented below, which describes a country-based named location. + * * `id` - The ID of the named location. + * * `ip` - An `ip` block as documented below, which describes an IP-based named location. + * * + * *** + * + * `country` block exports the following: + * + * * `countriesAndRegions` - List of countries and/or regions in two-letter format specified by ISO 3166-2. + * * `includeUnknownCountriesAndRegions` - Whether IP addresses that don't map to a country or region are included in the named location. + * + * *** + * + * `ip` block exports the following: + * + * * `ipRanges` - List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. + * * `trusted` - Whether the named location is trusted. + */ +export function getNamedLocation(args: GetNamedLocationArgs, opts?: pulumi.InvokeOptions): Promise { + + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("azuread:index/getNamedLocation:getNamedLocation", { + "displayName": args.displayName, + }, opts); +} + +/** + * A collection of arguments for invoking getNamedLocation. + */ +export interface GetNamedLocationArgs { + /** + * Specifies the display named of the named location to look up. + */ + displayName: string; +} + +/** + * A collection of values returned by getNamedLocation. + */ +export interface GetNamedLocationResult { + readonly countries: outputs.GetNamedLocationCountry[]; + readonly displayName: string; + /** + * The provider-assigned unique ID for this managed resource. + */ + readonly id: string; + readonly ips: outputs.GetNamedLocationIp[]; +} +/** + * Gets information about a Named Location within Azure Active Directory. + * + * ## API Permissions + * + * The following API permissions are required in order to use this data source. + * + * When authenticated with a service principal, this resource requires the following application roles: `Policy.Read.All` + * + * When authenticated with a user principal, this resource requires one of the following directory roles: `Conditional Access Administrator` or `Global Reader` + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as azuread from "@pulumi/azuread"; + * + * const example = azuread.getNamedLocation({ + * displayName: "My Named Location", + * }); + * ``` + * ## Attributes Reference + * + * The following attributes are exported: + * + * * `country` - A `country` block as documented below, which describes a country-based named location. + * * `id` - The ID of the named location. + * * `ip` - An `ip` block as documented below, which describes an IP-based named location. + * * + * *** + * + * `country` block exports the following: + * + * * `countriesAndRegions` - List of countries and/or regions in two-letter format specified by ISO 3166-2. + * * `includeUnknownCountriesAndRegions` - Whether IP addresses that don't map to a country or region are included in the named location. + * + * *** + * + * `ip` block exports the following: + * + * * `ipRanges` - List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. + * * `trusted` - Whether the named location is trusted. + */ +export function getNamedLocationOutput(args: GetNamedLocationOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { + return pulumi.output(args).apply((a: any) => getNamedLocation(a, opts)) +} + +/** + * A collection of arguments for invoking getNamedLocation. + */ +export interface GetNamedLocationOutputArgs { + /** + * Specifies the display named of the named location to look up. + */ + displayName: pulumi.Input; +} diff --git a/sdk/nodejs/index.ts b/sdk/nodejs/index.ts index ab6788288..f5843bc4e 100644 --- a/sdk/nodejs/index.ts +++ b/sdk/nodejs/index.ts @@ -153,6 +153,10 @@ export const getDirectoryObject: typeof import("./getDirectoryObject").getDirect export const getDirectoryObjectOutput: typeof import("./getDirectoryObject").getDirectoryObjectOutput = null as any; utilities.lazyLoad(exports, ["getDirectoryObject","getDirectoryObjectOutput"], () => require("./getDirectoryObject")); +export { GetDirectoryRoleTemplatesResult } from "./getDirectoryRoleTemplates"; +export const getDirectoryRoleTemplates: typeof import("./getDirectoryRoleTemplates").getDirectoryRoleTemplates = null as any; +utilities.lazyLoad(exports, ["getDirectoryRoleTemplates"], () => require("./getDirectoryRoleTemplates")); + export { GetDirectoryRolesResult } from "./getDirectoryRoles"; export const getDirectoryRoles: typeof import("./getDirectoryRoles").getDirectoryRoles = null as any; utilities.lazyLoad(exports, ["getDirectoryRoles"], () => require("./getDirectoryRoles")); @@ -172,6 +176,11 @@ export const getGroups: typeof import("./getGroups").getGroups = null as any; export const getGroupsOutput: typeof import("./getGroups").getGroupsOutput = null as any; utilities.lazyLoad(exports, ["getGroups","getGroupsOutput"], () => require("./getGroups")); +export { GetNamedLocationArgs, GetNamedLocationResult, GetNamedLocationOutputArgs } from "./getNamedLocation"; +export const getNamedLocation: typeof import("./getNamedLocation").getNamedLocation = null as any; +export const getNamedLocationOutput: typeof import("./getNamedLocation").getNamedLocationOutput = null as any; +utilities.lazyLoad(exports, ["getNamedLocation","getNamedLocationOutput"], () => require("./getNamedLocation")); + export { GetServicePrincipalArgs, GetServicePrincipalResult, GetServicePrincipalOutputArgs } from "./getServicePrincipal"; export const getServicePrincipal: typeof import("./getServicePrincipal").getServicePrincipal = null as any; export const getServicePrincipalOutput: typeof import("./getServicePrincipal").getServicePrincipalOutput = null as any; diff --git a/sdk/nodejs/provider.ts b/sdk/nodejs/provider.ts index 0252974c1..d60b662aa 100644 --- a/sdk/nodejs/provider.ts +++ b/sdk/nodejs/provider.ts @@ -22,7 +22,7 @@ export class Provider extends pulumi.ProviderResource { if (obj === undefined || obj === null) { return false; } - return obj['__pulumiType'] === Provider.__pulumiType; + return obj['__pulumiType'] === "pulumi:providers:" + Provider.__pulumiType; } /** diff --git a/sdk/nodejs/tsconfig.json b/sdk/nodejs/tsconfig.json index 5e16a2b11..3b7a16a82 100644 --- a/sdk/nodejs/tsconfig.json +++ b/sdk/nodejs/tsconfig.json @@ -45,10 +45,12 @@ "getApplicationTemplate.ts", "getClientConfig.ts", "getDirectoryObject.ts", + "getDirectoryRoleTemplates.ts", "getDirectoryRoles.ts", "getDomains.ts", "getGroup.ts", "getGroups.ts", + "getNamedLocation.ts", "getServicePrincipal.ts", "getServicePrincipals.ts", "getUser.ts", diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index 699cf6cf6..0226156c3 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -107,7 +107,7 @@ export interface AccessPackageAssignmentPolicyAssignmentReviewSettings { */ reviewFrequency?: pulumi.Input; /** - * Self review or specific reviewers. Valid values are `Self`, or `Reviewers`. + * Self-review or specific reviewers. Valid values are `Manager`, `Reviewers`, or `Self`. */ reviewType?: pulumi.Input; /** @@ -493,7 +493,11 @@ export interface ConditionalAccessPolicyConditions { */ platforms?: pulumi.Input; /** - * A list of sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. + * A list of service principal sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `none`, `unknownFutureValue`. + */ + servicePrincipalRiskLevels?: pulumi.Input[]>; + /** + * A list of user sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. */ signInRiskLevels?: pulumi.Input[]>; /** @@ -697,7 +701,7 @@ export interface NamedLocationCountry { export interface NamedLocationIp { /** - * List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596. + * List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. */ ipRanges: pulumi.Input[]>; /** diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts index 7aba607d4..4fd71ecf9 100644 --- a/sdk/nodejs/types/output.ts +++ b/sdk/nodejs/types/output.ts @@ -107,7 +107,7 @@ export interface AccessPackageAssignmentPolicyAssignmentReviewSettings { */ reviewFrequency?: string; /** - * Self review or specific reviewers. Valid values are `Self`, or `Reviewers`. + * Self-review or specific reviewers. Valid values are `Manager`, `Reviewers`, or `Self`. */ reviewType?: string; /** @@ -493,7 +493,11 @@ export interface ConditionalAccessPolicyConditions { */ platforms?: outputs.ConditionalAccessPolicyConditionsPlatforms; /** - * A list of sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. + * A list of service principal sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `none`, `unknownFutureValue`. + */ + servicePrincipalRiskLevels?: string[]; + /** + * A list of user sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. */ signInRiskLevels?: string[]; /** @@ -894,6 +898,21 @@ export interface GetApplicationWebImplicitGrant { idTokenIssuanceEnabled: boolean; } +export interface GetDirectoryRoleTemplatesRoleTemplate { + /** + * The description of the directory role template. + */ + description: string; + /** + * The display name of the directory role template. + */ + displayName: string; + /** + * The object ID of the directory role template. + */ + objectId: string; +} + export interface GetDirectoryRolesRole { /** * The description of the directory role. @@ -959,6 +978,16 @@ export interface GetGroupDynamicMembership { rule: string; } +export interface GetNamedLocationCountry { + countriesAndRegions: string[]; + includeUnknownCountriesAndRegions: boolean; +} + +export interface GetNamedLocationIp { + ipRanges: string[]; + trusted: boolean; +} + export interface GetServicePrincipalAppRole { /** * Specifies whether this app role definition can be assigned to users and groups, or to other applications (that are accessing this application in daemon service scenarios). Possible values are: `User` and `Application`, or both. @@ -1193,7 +1222,7 @@ export interface NamedLocationCountry { export interface NamedLocationIp { /** - * List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596. + * List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. */ ipRanges: string[]; /** diff --git a/sdk/python/pulumi_azuread/__init__.py b/sdk/python/pulumi_azuread/__init__.py index c4662423e..0d6d1b7cb 100644 --- a/sdk/python/pulumi_azuread/__init__.py +++ b/sdk/python/pulumi_azuread/__init__.py @@ -35,10 +35,12 @@ from .get_application_template import * from .get_client_config import * from .get_directory_object import * +from .get_directory_role_templates import * from .get_directory_roles import * from .get_domains import * from .get_group import * from .get_groups import * +from .get_named_location import * from .get_service_principal import * from .get_service_principals import * from .get_user import * diff --git a/sdk/python/pulumi_azuread/_inputs.py b/sdk/python/pulumi_azuread/_inputs.py index 967038d64..73f979529 100644 --- a/sdk/python/pulumi_azuread/_inputs.py +++ b/sdk/python/pulumi_azuread/_inputs.py @@ -362,7 +362,7 @@ def __init__(__self__, *, :param pulumi.Input[int] duration_in_days: How many days each occurrence of the access review series will run. :param pulumi.Input[bool] enabled: Whether to enable assignment review. :param pulumi.Input[str] review_frequency: This will determine how often the access review campaign runs, valid values are `weekly`, `monthly`, `quarterly`, `halfyearly`, or `annual`. - :param pulumi.Input[str] review_type: Self review or specific reviewers. Valid values are `Self`, or `Reviewers`. + :param pulumi.Input[str] review_type: Self-review or specific reviewers. Valid values are `Manager`, `Reviewers`, or `Self`. :param pulumi.Input[Sequence[pulumi.Input['AccessPackageAssignmentPolicyAssignmentReviewSettingsReviewerArgs']]] reviewers: One or more `reviewer` blocks to specify the users who will be reviewers (when `review_type` is `Reviewers`), as documented below. :param pulumi.Input[str] starting_on: This is the date the access review campaign will start on, formatted as an RFC3339 date string in UTC(e.g. 2018-01-01T01:02:03Z), default is now. Once an access review has been created, you cannot update its start date """ @@ -461,7 +461,7 @@ def review_frequency(self, value: Optional[pulumi.Input[str]]): @pulumi.getter(name="reviewType") def review_type(self) -> Optional[pulumi.Input[str]]: """ - Self review or specific reviewers. Valid values are `Self`, or `Reviewers`. + Self-review or specific reviewers. Valid values are `Manager`, `Reviewers`, or `Self`. """ return pulumi.get(self, "review_type") @@ -1782,6 +1782,7 @@ def __init__(__self__, *, devices: Optional[pulumi.Input['ConditionalAccessPolicyConditionsDevicesArgs']] = None, locations: Optional[pulumi.Input['ConditionalAccessPolicyConditionsLocationsArgs']] = None, platforms: Optional[pulumi.Input['ConditionalAccessPolicyConditionsPlatformsArgs']] = None, + service_principal_risk_levels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, sign_in_risk_levels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, user_risk_levels: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None): """ @@ -1792,7 +1793,8 @@ def __init__(__self__, *, :param pulumi.Input['ConditionalAccessPolicyConditionsDevicesArgs'] devices: A `devices` block as documented below, which describes devices to be included in and excluded from the policy. A `devices` block can be added to an existing policy, but removing the `devices` block forces a new resource to be created. :param pulumi.Input['ConditionalAccessPolicyConditionsLocationsArgs'] locations: A `locations` block as documented below, which specifies locations included in and excluded from the policy. :param pulumi.Input['ConditionalAccessPolicyConditionsPlatformsArgs'] platforms: A `platforms` block as documented below, which specifies platforms included in and excluded from the policy. - :param pulumi.Input[Sequence[pulumi.Input[str]]] sign_in_risk_levels: A list of sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. + :param pulumi.Input[Sequence[pulumi.Input[str]]] service_principal_risk_levels: A list of service principal sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `none`, `unknownFutureValue`. + :param pulumi.Input[Sequence[pulumi.Input[str]]] sign_in_risk_levels: A list of user sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. :param pulumi.Input[Sequence[pulumi.Input[str]]] user_risk_levels: A list of user risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. """ pulumi.set(__self__, "applications", applications) @@ -1806,6 +1808,8 @@ def __init__(__self__, *, pulumi.set(__self__, "locations", locations) if platforms is not None: pulumi.set(__self__, "platforms", platforms) + if service_principal_risk_levels is not None: + pulumi.set(__self__, "service_principal_risk_levels", service_principal_risk_levels) if sign_in_risk_levels is not None: pulumi.set(__self__, "sign_in_risk_levels", sign_in_risk_levels) if user_risk_levels is not None: @@ -1895,11 +1899,23 @@ def platforms(self) -> Optional[pulumi.Input['ConditionalAccessPolicyConditionsP def platforms(self, value: Optional[pulumi.Input['ConditionalAccessPolicyConditionsPlatformsArgs']]): pulumi.set(self, "platforms", value) + @property + @pulumi.getter(name="servicePrincipalRiskLevels") + def service_principal_risk_levels(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + A list of service principal sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `none`, `unknownFutureValue`. + """ + return pulumi.get(self, "service_principal_risk_levels") + + @service_principal_risk_levels.setter + def service_principal_risk_levels(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "service_principal_risk_levels", value) + @property @pulumi.getter(name="signInRiskLevels") def sign_in_risk_levels(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: """ - A list of sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. + A list of user sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. """ return pulumi.get(self, "sign_in_risk_levels") @@ -2595,7 +2611,7 @@ def __init__(__self__, *, ip_ranges: pulumi.Input[Sequence[pulumi.Input[str]]], trusted: Optional[pulumi.Input[bool]] = None): """ - :param pulumi.Input[Sequence[pulumi.Input[str]]] ip_ranges: List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596. + :param pulumi.Input[Sequence[pulumi.Input[str]]] ip_ranges: List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. :param pulumi.Input[bool] trusted: Whether the named location is trusted. Defaults to `false`. """ pulumi.set(__self__, "ip_ranges", ip_ranges) @@ -2606,7 +2622,7 @@ def __init__(__self__, *, @pulumi.getter(name="ipRanges") def ip_ranges(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]: """ - List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596. + List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. """ return pulumi.get(self, "ip_ranges") diff --git a/sdk/python/pulumi_azuread/conditional_access_policy.py b/sdk/python/pulumi_azuread/conditional_access_policy.py index 8df858f2b..db96fbd70 100644 --- a/sdk/python/pulumi_azuread/conditional_access_policy.py +++ b/sdk/python/pulumi_azuread/conditional_access_policy.py @@ -18,21 +18,24 @@ class ConditionalAccessPolicyArgs: def __init__(__self__, *, conditions: pulumi.Input['ConditionalAccessPolicyConditionsArgs'], display_name: pulumi.Input[str], - grant_controls: pulumi.Input['ConditionalAccessPolicyGrantControlsArgs'], state: pulumi.Input[str], + grant_controls: Optional[pulumi.Input['ConditionalAccessPolicyGrantControlsArgs']] = None, session_controls: Optional[pulumi.Input['ConditionalAccessPolicySessionControlsArgs']] = None): """ The set of arguments for constructing a ConditionalAccessPolicy resource. :param pulumi.Input['ConditionalAccessPolicyConditionsArgs'] conditions: A `conditions` block as documented below, which specifies the rules that must be met for the policy to apply. :param pulumi.Input[str] display_name: The friendly name for this Conditional Access Policy. - :param pulumi.Input['ConditionalAccessPolicyGrantControlsArgs'] grant_controls: A `grant_controls` block as documented below, which specifies the grant controls that must be fulfilled to pass the policy. :param pulumi.Input[str] state: Specifies the state of the policy object. Possible values are: `enabled`, `disabled` and `enabledForReportingButNotEnforced` + :param pulumi.Input['ConditionalAccessPolicyGrantControlsArgs'] grant_controls: A `grant_controls` block as documented below, which specifies the grant controls that must be fulfilled to pass the policy. :param pulumi.Input['ConditionalAccessPolicySessionControlsArgs'] session_controls: A `session_controls` block as documented below, which specifies the session controls that are enforced after sign-in. + + > Note: At least one of `grant_controls` and/or `session_controls` blocks must be specified. """ pulumi.set(__self__, "conditions", conditions) pulumi.set(__self__, "display_name", display_name) - pulumi.set(__self__, "grant_controls", grant_controls) pulumi.set(__self__, "state", state) + if grant_controls is not None: + pulumi.set(__self__, "grant_controls", grant_controls) if session_controls is not None: pulumi.set(__self__, "session_controls", session_controls) @@ -60,18 +63,6 @@ def display_name(self) -> pulumi.Input[str]: def display_name(self, value: pulumi.Input[str]): pulumi.set(self, "display_name", value) - @property - @pulumi.getter(name="grantControls") - def grant_controls(self) -> pulumi.Input['ConditionalAccessPolicyGrantControlsArgs']: - """ - A `grant_controls` block as documented below, which specifies the grant controls that must be fulfilled to pass the policy. - """ - return pulumi.get(self, "grant_controls") - - @grant_controls.setter - def grant_controls(self, value: pulumi.Input['ConditionalAccessPolicyGrantControlsArgs']): - pulumi.set(self, "grant_controls", value) - @property @pulumi.getter def state(self) -> pulumi.Input[str]: @@ -84,11 +75,25 @@ def state(self) -> pulumi.Input[str]: def state(self, value: pulumi.Input[str]): pulumi.set(self, "state", value) + @property + @pulumi.getter(name="grantControls") + def grant_controls(self) -> Optional[pulumi.Input['ConditionalAccessPolicyGrantControlsArgs']]: + """ + A `grant_controls` block as documented below, which specifies the grant controls that must be fulfilled to pass the policy. + """ + return pulumi.get(self, "grant_controls") + + @grant_controls.setter + def grant_controls(self, value: Optional[pulumi.Input['ConditionalAccessPolicyGrantControlsArgs']]): + pulumi.set(self, "grant_controls", value) + @property @pulumi.getter(name="sessionControls") def session_controls(self) -> Optional[pulumi.Input['ConditionalAccessPolicySessionControlsArgs']]: """ A `session_controls` block as documented below, which specifies the session controls that are enforced after sign-in. + + > Note: At least one of `grant_controls` and/or `session_controls` blocks must be specified. """ return pulumi.get(self, "session_controls") @@ -111,6 +116,8 @@ def __init__(__self__, *, :param pulumi.Input[str] display_name: The friendly name for this Conditional Access Policy. :param pulumi.Input['ConditionalAccessPolicyGrantControlsArgs'] grant_controls: A `grant_controls` block as documented below, which specifies the grant controls that must be fulfilled to pass the policy. :param pulumi.Input['ConditionalAccessPolicySessionControlsArgs'] session_controls: A `session_controls` block as documented below, which specifies the session controls that are enforced after sign-in. + + > Note: At least one of `grant_controls` and/or `session_controls` blocks must be specified. :param pulumi.Input[str] state: Specifies the state of the policy object. Possible values are: `enabled`, `disabled` and `enabledForReportingButNotEnforced` """ if conditions is not None: @@ -165,6 +172,8 @@ def grant_controls(self, value: Optional[pulumi.Input['ConditionalAccessPolicyGr def session_controls(self) -> Optional[pulumi.Input['ConditionalAccessPolicySessionControlsArgs']]: """ A `session_controls` block as documented below, which specifies the session controls that are enforced after sign-in. + + > Note: At least one of `grant_controls` and/or `session_controls` blocks must be specified. """ return pulumi.get(self, "session_controls") @@ -329,6 +338,8 @@ def __init__(__self__, :param pulumi.Input[str] display_name: The friendly name for this Conditional Access Policy. :param pulumi.Input[pulumi.InputType['ConditionalAccessPolicyGrantControlsArgs']] grant_controls: A `grant_controls` block as documented below, which specifies the grant controls that must be fulfilled to pass the policy. :param pulumi.Input[pulumi.InputType['ConditionalAccessPolicySessionControlsArgs']] session_controls: A `session_controls` block as documented below, which specifies the session controls that are enforced after sign-in. + + > Note: At least one of `grant_controls` and/or `session_controls` blocks must be specified. :param pulumi.Input[str] state: Specifies the state of the policy object. Possible values are: `enabled`, `disabled` and `enabledForReportingButNotEnforced` """ ... @@ -499,8 +510,6 @@ def _internal_init(__self__, if display_name is None and not opts.urn: raise TypeError("Missing required property 'display_name'") __props__.__dict__["display_name"] = display_name - if grant_controls is None and not opts.urn: - raise TypeError("Missing required property 'grant_controls'") __props__.__dict__["grant_controls"] = grant_controls __props__.__dict__["session_controls"] = session_controls if state is None and not opts.urn: @@ -532,6 +541,8 @@ def get(resource_name: str, :param pulumi.Input[str] display_name: The friendly name for this Conditional Access Policy. :param pulumi.Input[pulumi.InputType['ConditionalAccessPolicyGrantControlsArgs']] grant_controls: A `grant_controls` block as documented below, which specifies the grant controls that must be fulfilled to pass the policy. :param pulumi.Input[pulumi.InputType['ConditionalAccessPolicySessionControlsArgs']] session_controls: A `session_controls` block as documented below, which specifies the session controls that are enforced after sign-in. + + > Note: At least one of `grant_controls` and/or `session_controls` blocks must be specified. :param pulumi.Input[str] state: Specifies the state of the policy object. Possible values are: `enabled`, `disabled` and `enabledForReportingButNotEnforced` """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) @@ -563,7 +574,7 @@ def display_name(self) -> pulumi.Output[str]: @property @pulumi.getter(name="grantControls") - def grant_controls(self) -> pulumi.Output['outputs.ConditionalAccessPolicyGrantControls']: + def grant_controls(self) -> pulumi.Output[Optional['outputs.ConditionalAccessPolicyGrantControls']]: """ A `grant_controls` block as documented below, which specifies the grant controls that must be fulfilled to pass the policy. """ @@ -574,6 +585,8 @@ def grant_controls(self) -> pulumi.Output['outputs.ConditionalAccessPolicyGrantC def session_controls(self) -> pulumi.Output[Optional['outputs.ConditionalAccessPolicySessionControls']]: """ A `session_controls` block as documented below, which specifies the session controls that are enforced after sign-in. + + > Note: At least one of `grant_controls` and/or `session_controls` blocks must be specified. """ return pulumi.get(self, "session_controls") diff --git a/sdk/python/pulumi_azuread/get_directory_role_templates.py b/sdk/python/pulumi_azuread/get_directory_role_templates.py new file mode 100644 index 000000000..8387952c8 --- /dev/null +++ b/sdk/python/pulumi_azuread/get_directory_role_templates.py @@ -0,0 +1,100 @@ +# coding=utf-8 +# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +# *** 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__ = [ + 'GetDirectoryRoleTemplatesResult', + 'AwaitableGetDirectoryRoleTemplatesResult', + 'get_directory_role_templates', +] + +@pulumi.output_type +class GetDirectoryRoleTemplatesResult: + """ + A collection of values returned by getDirectoryRoleTemplates. + """ + def __init__(__self__, id=None, object_ids=None, role_templates=None): + if id and not isinstance(id, str): + raise TypeError("Expected argument 'id' to be a str") + pulumi.set(__self__, "id", id) + if object_ids and not isinstance(object_ids, list): + raise TypeError("Expected argument 'object_ids' to be a list") + pulumi.set(__self__, "object_ids", object_ids) + if role_templates and not isinstance(role_templates, list): + raise TypeError("Expected argument 'role_templates' to be a list") + pulumi.set(__self__, "role_templates", role_templates) + + @property + @pulumi.getter + def id(self) -> str: + """ + The provider-assigned unique ID for this managed resource. + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter(name="objectIds") + def object_ids(self) -> Sequence[str]: + """ + The object IDs of the role templates. + """ + return pulumi.get(self, "object_ids") + + @property + @pulumi.getter(name="roleTemplates") + def role_templates(self) -> Sequence['outputs.GetDirectoryRoleTemplatesRoleTemplateResult']: + """ + A list of role templates. Each `role_template` object provides the attributes documented below. + """ + return pulumi.get(self, "role_templates") + + +class AwaitableGetDirectoryRoleTemplatesResult(GetDirectoryRoleTemplatesResult): + # pylint: disable=using-constant-test + def __await__(self): + if False: + yield self + return GetDirectoryRoleTemplatesResult( + id=self.id, + object_ids=self.object_ids, + role_templates=self.role_templates) + + +def get_directory_role_templates(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDirectoryRoleTemplatesResult: + """ + Use this data source to access information about directory role templates within Azure Active Directory. + + ## API Permissions + + The following API permissions are required in order to use this resource. + + When authenticated with a service principal, this resource requires one of the following application roles: `RoleManagement.Read.Directory` or `Directory.Read.All` + + When authenticated with a user principal, this data source does not require any additional roles. + + ## Example Usage + + ```python + import pulumi + import pulumi_azuread as azuread + + current = azuread.get_directory_role_templates() + pulumi.export("roles", current.object_ids) + ``` + """ + __args__ = dict() + opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + __ret__ = pulumi.runtime.invoke('azuread:index/getDirectoryRoleTemplates:getDirectoryRoleTemplates', __args__, opts=opts, typ=GetDirectoryRoleTemplatesResult).value + + return AwaitableGetDirectoryRoleTemplatesResult( + id=pulumi.get(__ret__, 'id'), + object_ids=pulumi.get(__ret__, 'object_ids'), + role_templates=pulumi.get(__ret__, 'role_templates')) diff --git a/sdk/python/pulumi_azuread/get_named_location.py b/sdk/python/pulumi_azuread/get_named_location.py new file mode 100644 index 000000000..92835b9ba --- /dev/null +++ b/sdk/python/pulumi_azuread/get_named_location.py @@ -0,0 +1,180 @@ +# coding=utf-8 +# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +# *** 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__ = [ + 'GetNamedLocationResult', + 'AwaitableGetNamedLocationResult', + 'get_named_location', + 'get_named_location_output', +] + +@pulumi.output_type +class GetNamedLocationResult: + """ + A collection of values returned by getNamedLocation. + """ + def __init__(__self__, countries=None, display_name=None, id=None, ips=None): + if countries and not isinstance(countries, list): + raise TypeError("Expected argument 'countries' to be a list") + pulumi.set(__self__, "countries", countries) + 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 id and not isinstance(id, str): + raise TypeError("Expected argument 'id' to be a str") + pulumi.set(__self__, "id", id) + if ips and not isinstance(ips, list): + raise TypeError("Expected argument 'ips' to be a list") + pulumi.set(__self__, "ips", ips) + + @property + @pulumi.getter + def countries(self) -> Sequence['outputs.GetNamedLocationCountryResult']: + return pulumi.get(self, "countries") + + @property + @pulumi.getter(name="displayName") + def display_name(self) -> str: + return pulumi.get(self, "display_name") + + @property + @pulumi.getter + def id(self) -> str: + """ + The provider-assigned unique ID for this managed resource. + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter + def ips(self) -> Sequence['outputs.GetNamedLocationIpResult']: + return pulumi.get(self, "ips") + + +class AwaitableGetNamedLocationResult(GetNamedLocationResult): + # pylint: disable=using-constant-test + def __await__(self): + if False: + yield self + return GetNamedLocationResult( + countries=self.countries, + display_name=self.display_name, + id=self.id, + ips=self.ips) + + +def get_named_location(display_name: Optional[str] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetNamedLocationResult: + """ + Gets information about a Named Location within Azure Active Directory. + + ## API Permissions + + The following API permissions are required in order to use this data source. + + When authenticated with a service principal, this resource requires the following application roles: `Policy.Read.All` + + When authenticated with a user principal, this resource requires one of the following directory roles: `Conditional Access Administrator` or `Global Reader` + + ## Example Usage + + ```python + import pulumi + import pulumi_azuread as azuread + + example = azuread.get_named_location(display_name="My Named Location") + ``` + ## Attributes Reference + + The following attributes are exported: + + * `country` - A `country` block as documented below, which describes a country-based named location. + * `id` - The ID of the named location. + * `ip` - An `ip` block as documented below, which describes an IP-based named location. + * + *** + + `country` block exports the following: + + * `countries_and_regions` - List of countries and/or regions in two-letter format specified by ISO 3166-2. + * `include_unknown_countries_and_regions` - Whether IP addresses that don't map to a country or region are included in the named location. + + *** + + `ip` block exports the following: + + * `ip_ranges` - List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. + * `trusted` - Whether the named location is trusted. + + + :param str display_name: Specifies the display named of the named location to look up. + """ + __args__ = dict() + __args__['displayName'] = display_name + opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + __ret__ = pulumi.runtime.invoke('azuread:index/getNamedLocation:getNamedLocation', __args__, opts=opts, typ=GetNamedLocationResult).value + + return AwaitableGetNamedLocationResult( + countries=pulumi.get(__ret__, 'countries'), + display_name=pulumi.get(__ret__, 'display_name'), + id=pulumi.get(__ret__, 'id'), + ips=pulumi.get(__ret__, 'ips')) + + +@_utilities.lift_output_func(get_named_location) +def get_named_location_output(display_name: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNamedLocationResult]: + """ + Gets information about a Named Location within Azure Active Directory. + + ## API Permissions + + The following API permissions are required in order to use this data source. + + When authenticated with a service principal, this resource requires the following application roles: `Policy.Read.All` + + When authenticated with a user principal, this resource requires one of the following directory roles: `Conditional Access Administrator` or `Global Reader` + + ## Example Usage + + ```python + import pulumi + import pulumi_azuread as azuread + + example = azuread.get_named_location(display_name="My Named Location") + ``` + ## Attributes Reference + + The following attributes are exported: + + * `country` - A `country` block as documented below, which describes a country-based named location. + * `id` - The ID of the named location. + * `ip` - An `ip` block as documented below, which describes an IP-based named location. + * + *** + + `country` block exports the following: + + * `countries_and_regions` - List of countries and/or regions in two-letter format specified by ISO 3166-2. + * `include_unknown_countries_and_regions` - Whether IP addresses that don't map to a country or region are included in the named location. + + *** + + `ip` block exports the following: + + * `ip_ranges` - List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. + * `trusted` - Whether the named location is trusted. + + + :param str display_name: Specifies the display named of the named location to look up. + """ + ... diff --git a/sdk/python/pulumi_azuread/outputs.py b/sdk/python/pulumi_azuread/outputs.py index 3e64f8b6d..4b5f04e08 100644 --- a/sdk/python/pulumi_azuread/outputs.py +++ b/sdk/python/pulumi_azuread/outputs.py @@ -75,9 +75,12 @@ 'GetApplicationSinglePageApplicationResult', 'GetApplicationWebResult', 'GetApplicationWebImplicitGrantResult', + 'GetDirectoryRoleTemplatesRoleTemplateResult', 'GetDirectoryRolesRoleResult', 'GetDomainsDomainResult', 'GetGroupDynamicMembershipResult', + 'GetNamedLocationCountryResult', + 'GetNamedLocationIpResult', 'GetServicePrincipalAppRoleResult', 'GetServicePrincipalFeatureResult', 'GetServicePrincipalFeatureTagResult', @@ -440,7 +443,7 @@ def __init__(__self__, *, :param int duration_in_days: How many days each occurrence of the access review series will run. :param bool enabled: Whether to enable assignment review. :param str review_frequency: This will determine how often the access review campaign runs, valid values are `weekly`, `monthly`, `quarterly`, `halfyearly`, or `annual`. - :param str review_type: Self review or specific reviewers. Valid values are `Self`, or `Reviewers`. + :param str review_type: Self-review or specific reviewers. Valid values are `Manager`, `Reviewers`, or `Self`. :param Sequence['AccessPackageAssignmentPolicyAssignmentReviewSettingsReviewerArgs'] reviewers: One or more `reviewer` blocks to specify the users who will be reviewers (when `review_type` is `Reviewers`), as documented below. :param str starting_on: This is the date the access review campaign will start on, formatted as an RFC3339 date string in UTC(e.g. 2018-01-01T01:02:03Z), default is now. Once an access review has been created, you cannot update its start date """ @@ -515,7 +518,7 @@ def review_frequency(self) -> Optional[str]: @pulumi.getter(name="reviewType") def review_type(self) -> Optional[str]: """ - Self review or specific reviewers. Valid values are `Self`, or `Reviewers`. + Self-review or specific reviewers. Valid values are `Manager`, `Reviewers`, or `Self`. """ return pulumi.get(self, "review_type") @@ -1932,6 +1935,8 @@ def __key_warning(key: str): suggest = "client_app_types" elif key == "clientApplications": suggest = "client_applications" + elif key == "servicePrincipalRiskLevels": + suggest = "service_principal_risk_levels" elif key == "signInRiskLevels": suggest = "sign_in_risk_levels" elif key == "userRiskLevels": @@ -1956,6 +1961,7 @@ def __init__(__self__, *, devices: Optional['outputs.ConditionalAccessPolicyConditionsDevices'] = None, locations: Optional['outputs.ConditionalAccessPolicyConditionsLocations'] = None, platforms: Optional['outputs.ConditionalAccessPolicyConditionsPlatforms'] = None, + service_principal_risk_levels: Optional[Sequence[str]] = None, sign_in_risk_levels: Optional[Sequence[str]] = None, user_risk_levels: Optional[Sequence[str]] = None): """ @@ -1966,7 +1972,8 @@ def __init__(__self__, *, :param 'ConditionalAccessPolicyConditionsDevicesArgs' devices: A `devices` block as documented below, which describes devices to be included in and excluded from the policy. A `devices` block can be added to an existing policy, but removing the `devices` block forces a new resource to be created. :param 'ConditionalAccessPolicyConditionsLocationsArgs' locations: A `locations` block as documented below, which specifies locations included in and excluded from the policy. :param 'ConditionalAccessPolicyConditionsPlatformsArgs' platforms: A `platforms` block as documented below, which specifies platforms included in and excluded from the policy. - :param Sequence[str] sign_in_risk_levels: A list of sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. + :param Sequence[str] service_principal_risk_levels: A list of service principal sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `none`, `unknownFutureValue`. + :param Sequence[str] sign_in_risk_levels: A list of user sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. :param Sequence[str] user_risk_levels: A list of user risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. """ pulumi.set(__self__, "applications", applications) @@ -1980,6 +1987,8 @@ def __init__(__self__, *, pulumi.set(__self__, "locations", locations) if platforms is not None: pulumi.set(__self__, "platforms", platforms) + if service_principal_risk_levels is not None: + pulumi.set(__self__, "service_principal_risk_levels", service_principal_risk_levels) if sign_in_risk_levels is not None: pulumi.set(__self__, "sign_in_risk_levels", sign_in_risk_levels) if user_risk_levels is not None: @@ -2041,11 +2050,19 @@ def platforms(self) -> Optional['outputs.ConditionalAccessPolicyConditionsPlatfo """ return pulumi.get(self, "platforms") + @property + @pulumi.getter(name="servicePrincipalRiskLevels") + def service_principal_risk_levels(self) -> Optional[Sequence[str]]: + """ + A list of service principal sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `none`, `unknownFutureValue`. + """ + return pulumi.get(self, "service_principal_risk_levels") + @property @pulumi.getter(name="signInRiskLevels") def sign_in_risk_levels(self) -> Optional[Sequence[str]]: """ - A list of sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. + A list of user sign-in risk levels included in the policy. Possible values are: `low`, `medium`, `high`, `hidden`, `none`, `unknownFutureValue`. """ return pulumi.get(self, "sign_in_risk_levels") @@ -2812,7 +2829,7 @@ def __init__(__self__, *, ip_ranges: Sequence[str], trusted: Optional[bool] = None): """ - :param Sequence[str] ip_ranges: List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596. + :param Sequence[str] ip_ranges: List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. :param bool trusted: Whether the named location is trusted. Defaults to `false`. """ pulumi.set(__self__, "ip_ranges", ip_ranges) @@ -2823,7 +2840,7 @@ def __init__(__self__, *, @pulumi.getter(name="ipRanges") def ip_ranges(self) -> Sequence[str]: """ - List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596. + List of IP address ranges in IPv4 CIDR format (e.g. `1.2.3.4/32`) or any allowable IPv6 format from IETF RFC596. """ return pulumi.get(self, "ip_ranges") @@ -3953,6 +3970,46 @@ def id_token_issuance_enabled(self) -> bool: return pulumi.get(self, "id_token_issuance_enabled") +@pulumi.output_type +class GetDirectoryRoleTemplatesRoleTemplateResult(dict): + def __init__(__self__, *, + description: str, + display_name: str, + object_id: str): + """ + :param str description: The description of the directory role template. + :param str display_name: The display name of the directory role template. + :param str object_id: The object ID of the directory role template. + """ + pulumi.set(__self__, "description", description) + pulumi.set(__self__, "display_name", display_name) + pulumi.set(__self__, "object_id", object_id) + + @property + @pulumi.getter + def description(self) -> str: + """ + The description of the directory role template. + """ + return pulumi.get(self, "description") + + @property + @pulumi.getter(name="displayName") + def display_name(self) -> str: + """ + The display name of the directory role template. + """ + return pulumi.get(self, "display_name") + + @property + @pulumi.getter(name="objectId") + def object_id(self) -> str: + """ + The object ID of the directory role template. + """ + return pulumi.get(self, "object_id") + + @pulumi.output_type class GetDirectoryRolesRoleResult(dict): def __init__(__self__, *, @@ -4128,6 +4185,44 @@ def rule(self) -> str: return pulumi.get(self, "rule") +@pulumi.output_type +class GetNamedLocationCountryResult(dict): + def __init__(__self__, *, + countries_and_regions: Sequence[str], + include_unknown_countries_and_regions: bool): + pulumi.set(__self__, "countries_and_regions", countries_and_regions) + pulumi.set(__self__, "include_unknown_countries_and_regions", include_unknown_countries_and_regions) + + @property + @pulumi.getter(name="countriesAndRegions") + def countries_and_regions(self) -> Sequence[str]: + return pulumi.get(self, "countries_and_regions") + + @property + @pulumi.getter(name="includeUnknownCountriesAndRegions") + def include_unknown_countries_and_regions(self) -> bool: + return pulumi.get(self, "include_unknown_countries_and_regions") + + +@pulumi.output_type +class GetNamedLocationIpResult(dict): + def __init__(__self__, *, + ip_ranges: Sequence[str], + trusted: bool): + pulumi.set(__self__, "ip_ranges", ip_ranges) + pulumi.set(__self__, "trusted", trusted) + + @property + @pulumi.getter(name="ipRanges") + def ip_ranges(self) -> Sequence[str]: + return pulumi.get(self, "ip_ranges") + + @property + @pulumi.getter + def trusted(self) -> bool: + return pulumi.get(self, "trusted") + + @pulumi.output_type class GetServicePrincipalAppRoleResult(dict): def __init__(__self__, *,