All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.domainservices.Service Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.10.0-alpha.1731737215
Show newest version
// *** 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.azure.domainservices;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.domainservices.ServiceArgs;
import com.pulumi.azure.domainservices.inputs.ServiceState;
import com.pulumi.azure.domainservices.outputs.ServiceInitialReplicaSet;
import com.pulumi.azure.domainservices.outputs.ServiceNotifications;
import com.pulumi.azure.domainservices.outputs.ServiceSecureLdap;
import com.pulumi.azure.domainservices.outputs.ServiceSecurity;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.network.VirtualNetwork;
 * import com.pulumi.azure.network.VirtualNetworkArgs;
 * import com.pulumi.azure.network.Subnet;
 * import com.pulumi.azure.network.SubnetArgs;
 * import com.pulumi.azure.network.NetworkSecurityGroup;
 * import com.pulumi.azure.network.NetworkSecurityGroupArgs;
 * import com.pulumi.azure.network.inputs.NetworkSecurityGroupSecurityRuleArgs;
 * import com.pulumi.azure.network.SubnetNetworkSecurityGroupAssociation;
 * import com.pulumi.azure.network.SubnetNetworkSecurityGroupAssociationArgs;
 * import com.pulumi.azuread.Group;
 * import com.pulumi.azuread.GroupArgs;
 * import com.pulumi.azuread.User;
 * import com.pulumi.azuread.UserArgs;
 * import com.pulumi.azuread.GroupMember;
 * import com.pulumi.azuread.GroupMemberArgs;
 * import com.pulumi.azuread.ServicePrincipal;
 * import com.pulumi.azuread.ServicePrincipalArgs;
 * import com.pulumi.azure.domainservices.Service;
 * import com.pulumi.azure.domainservices.ServiceArgs;
 * import com.pulumi.azure.domainservices.inputs.ServiceInitialReplicaSetArgs;
 * import com.pulumi.azure.domainservices.inputs.ServiceNotificationsArgs;
 * import com.pulumi.azure.domainservices.inputs.ServiceSecurityArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * 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 }{{@code
 *     public static void main(String[] args) }{{@code
 *         Pulumi.run(App::stack);
 *     }}{@code
 * 
 *     public static void stack(Context ctx) }{{@code
 *         var deploy = new ResourceGroup("deploy", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 * 
 *         var deployVirtualNetwork = new VirtualNetwork("deployVirtualNetwork", VirtualNetworkArgs.builder()
 *             .name("deploy-vnet")
 *             .location(deploy.location())
 *             .resourceGroupName(deploy.name())
 *             .addressSpaces("10.0.1.0/16")
 *             .build());
 * 
 *         var deploySubnet = new Subnet("deploySubnet", SubnetArgs.builder()
 *             .name("deploy-subnet")
 *             .resourceGroupName(deploy.name())
 *             .virtualNetworkName(deployVirtualNetwork.name())
 *             .addressPrefixes("10.0.1.0/24")
 *             .build());
 * 
 *         var deployNetworkSecurityGroup = new NetworkSecurityGroup("deployNetworkSecurityGroup", NetworkSecurityGroupArgs.builder()
 *             .name("deploy-nsg")
 *             .location(deploy.location())
 *             .resourceGroupName(deploy.name())
 *             .securityRules(            
 *                 NetworkSecurityGroupSecurityRuleArgs.builder()
 *                     .name("AllowSyncWithAzureAD")
 *                     .priority(101)
 *                     .direction("Inbound")
 *                     .access("Allow")
 *                     .protocol("Tcp")
 *                     .sourcePortRange("*")
 *                     .destinationPortRange("443")
 *                     .sourceAddressPrefix("AzureActiveDirectoryDomainServices")
 *                     .destinationAddressPrefix("*")
 *                     .build(),
 *                 NetworkSecurityGroupSecurityRuleArgs.builder()
 *                     .name("AllowRD")
 *                     .priority(201)
 *                     .direction("Inbound")
 *                     .access("Allow")
 *                     .protocol("Tcp")
 *                     .sourcePortRange("*")
 *                     .destinationPortRange("3389")
 *                     .sourceAddressPrefix("CorpNetSaw")
 *                     .destinationAddressPrefix("*")
 *                     .build(),
 *                 NetworkSecurityGroupSecurityRuleArgs.builder()
 *                     .name("AllowPSRemoting")
 *                     .priority(301)
 *                     .direction("Inbound")
 *                     .access("Allow")
 *                     .protocol("Tcp")
 *                     .sourcePortRange("*")
 *                     .destinationPortRange("5986")
 *                     .sourceAddressPrefix("AzureActiveDirectoryDomainServices")
 *                     .destinationAddressPrefix("*")
 *                     .build(),
 *                 NetworkSecurityGroupSecurityRuleArgs.builder()
 *                     .name("AllowLDAPS")
 *                     .priority(401)
 *                     .direction("Inbound")
 *                     .access("Allow")
 *                     .protocol("Tcp")
 *                     .sourcePortRange("*")
 *                     .destinationPortRange("636")
 *                     .sourceAddressPrefix("*")
 *                     .destinationAddressPrefix("*")
 *                     .build())
 *             .build());
 * 
 *         var deploySubnetNetworkSecurityGroupAssociation = new SubnetNetworkSecurityGroupAssociation("deploySubnetNetworkSecurityGroupAssociation", SubnetNetworkSecurityGroupAssociationArgs.builder()
 *             .subnetId(deploySubnet.id())
 *             .networkSecurityGroupId(deployNetworkSecurityGroup.id())
 *             .build());
 * 
 *         var dcAdmins = new Group("dcAdmins", GroupArgs.builder()
 *             .displayName("AAD DC Administrators")
 *             .securityEnabled(true)
 *             .build());
 * 
 *         var admin = new User("admin", UserArgs.builder()
 *             .userPrincipalName("dc-admin}{@literal @}{@code hashicorp-example.com")
 *             .displayName("DC Administrator")
 *             .password("Pa55w0Rd!!1")
 *             .build());
 * 
 *         var adminGroupMember = new GroupMember("adminGroupMember", GroupMemberArgs.builder()
 *             .groupObjectId(dcAdmins.objectId())
 *             .memberObjectId(admin.objectId())
 *             .build());
 * 
 *         var example = new ServicePrincipal("example", ServicePrincipalArgs.builder()
 *             .applicationId("2565bd9d-da50-47d4-8b85-4c97f669dc36")
 *             .build());
 * 
 *         var aadds = new ResourceGroup("aadds", ResourceGroupArgs.builder()
 *             .name("aadds-rg")
 *             .location("westeurope")
 *             .build());
 * 
 *         var exampleService = new Service("exampleService", ServiceArgs.builder()
 *             .name("example-aadds")
 *             .location(aadds.location())
 *             .resourceGroupName(aadds.name())
 *             .domainName("widgetslogin.net")
 *             .sku("Enterprise")
 *             .filteredSyncEnabled(false)
 *             .initialReplicaSet(ServiceInitialReplicaSetArgs.builder()
 *                 .subnetId(deploySubnet.id())
 *                 .build())
 *             .notifications(ServiceNotificationsArgs.builder()
 *                 .additionalRecipients(                
 *                     "notifyA}{@literal @}{@code example.net",
 *                     "notifyB}{@literal @}{@code example.org")
 *                 .notifyDcAdmins(true)
 *                 .notifyGlobalAdmins(true)
 *                 .build())
 *             .security(ServiceSecurityArgs.builder()
 *                 .syncKerberosPasswords(true)
 *                 .syncNtlmPasswords(true)
 *                 .syncOnPremPasswords(true)
 *                 .build())
 *             .tags(Map.of("Environment", "prod"))
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(                
 *                     example,
 *                     deploySubnetNetworkSecurityGroupAssociation)
 *                 .build());
 * 
 *     }}{@code
 * }}{@code
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Domain Services can be imported using the resource ID, together with the Replica Set ID that you wish to designate as the initial replica set, e.g. * * ```sh * $ pulumi import azure:domainservices/service:Service example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.AAD/domainServices/instance1/initialReplicaSetId/00000000-0000-0000-0000-000000000000 * ``` * */ @ResourceType(type="azure:domainservices/service:Service") public class Service extends com.pulumi.resources.CustomResource { /** * A unique ID for the managed domain deployment. * */ @Export(name="deploymentId", refs={String.class}, tree="[0]") private Output deploymentId; /** * @return A unique ID for the managed domain deployment. * */ public Output deploymentId() { return this.deploymentId; } /** * The configuration type of this Active Directory Domain. Possible values are `FullySynced` and `ResourceTrusting`. Changing this forces a new resource to be created. * */ @Export(name="domainConfigurationType", refs={String.class}, tree="[0]") private Output domainConfigurationType; /** * @return The configuration type of this Active Directory Domain. Possible values are `FullySynced` and `ResourceTrusting`. Changing this forces a new resource to be created. * */ public Output> domainConfigurationType() { return Codegen.optional(this.domainConfigurationType); } /** * The Active Directory domain to use. See [official documentation](https://docs.microsoft.com/azure/active-directory-domain-services/tutorial-create-instance#create-a-managed-domain) for constraints and recommendations. Changing this forces a new resource to be created. * */ @Export(name="domainName", refs={String.class}, tree="[0]") private Output domainName; /** * @return The Active Directory domain to use. See [official documentation](https://docs.microsoft.com/azure/active-directory-domain-services/tutorial-create-instance#create-a-managed-domain) for constraints and recommendations. Changing this forces a new resource to be created. * */ public Output domainName() { return this.domainName; } /** * Whether to enable group-based filtered sync (also called scoped synchronisation). Defaults to `false`. * */ @Export(name="filteredSyncEnabled", refs={Boolean.class}, tree="[0]") private Output filteredSyncEnabled; /** * @return Whether to enable group-based filtered sync (also called scoped synchronisation). Defaults to `false`. * */ public Output> filteredSyncEnabled() { return Codegen.optional(this.filteredSyncEnabled); } /** * An `initial_replica_set` block as defined below. The initial replica set inherits the same location as the Domain Service resource. * */ @Export(name="initialReplicaSet", refs={ServiceInitialReplicaSet.class}, tree="[0]") private Output initialReplicaSet; /** * @return An `initial_replica_set` block as defined below. The initial replica set inherits the same location as the Domain Service resource. * */ public Output initialReplicaSet() { return this.initialReplicaSet; } /** * The Azure location where the Domain Service exists. Changing this forces a new resource to be created. * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return The Azure location where the Domain Service exists. Changing this forces a new resource to be created. * */ public Output location() { return this.location; } /** * The display name for your managed Active Directory Domain Service resource. Changing this forces a new resource to be created. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The display name for your managed Active Directory Domain Service resource. Changing this forces a new resource to be created. * */ public Output name() { return this.name; } /** * A `notifications` block as defined below. * */ @Export(name="notifications", refs={ServiceNotifications.class}, tree="[0]") private Output notifications; /** * @return A `notifications` block as defined below. * */ public Output notifications() { return this.notifications; } /** * The name of the Resource Group in which the Domain Service should exist. Changing this forces a new resource to be created. * */ @Export(name="resourceGroupName", refs={String.class}, tree="[0]") private Output resourceGroupName; /** * @return The name of the Resource Group in which the Domain Service should exist. Changing this forces a new resource to be created. * */ public Output resourceGroupName() { return this.resourceGroupName; } /** * The Azure resource ID for the domain service. * */ @Export(name="resourceId", refs={String.class}, tree="[0]") private Output resourceId; /** * @return The Azure resource ID for the domain service. * */ public Output resourceId() { return this.resourceId; } /** * A `secure_ldap` block as defined below. * */ @Export(name="secureLdap", refs={ServiceSecureLdap.class}, tree="[0]") private Output secureLdap; /** * @return A `secure_ldap` block as defined below. * */ public Output secureLdap() { return this.secureLdap; } /** * A `security` block as defined below. * */ @Export(name="security", refs={ServiceSecurity.class}, tree="[0]") private Output security; /** * @return A `security` block as defined below. * */ public Output security() { return this.security; } /** * The SKU to use when provisioning the Domain Service resource. One of `Standard`, `Enterprise` or `Premium`. * */ @Export(name="sku", refs={String.class}, tree="[0]") private Output sku; /** * @return The SKU to use when provisioning the Domain Service resource. One of `Standard`, `Enterprise` or `Premium`. * */ public Output sku() { return this.sku; } @Export(name="syncOwner", refs={String.class}, tree="[0]") private Output syncOwner; public Output syncOwner() { return this.syncOwner; } /** * A mapping of tags assigned to the resource. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return A mapping of tags assigned to the resource. * */ public Output>> tags() { return Codegen.optional(this.tags); } @Export(name="tenantId", refs={String.class}, tree="[0]") private Output tenantId; public Output tenantId() { return this.tenantId; } @Export(name="version", refs={Integer.class}, tree="[0]") private Output version; public Output version() { return this.version; } /** * * @param name The _unique_ name of the resulting resource. */ public Service(java.lang.String name) { this(name, ServiceArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Service(java.lang.String name, ServiceArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public Service(java.lang.String name, ServiceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:domainservices/service:Service", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Service(java.lang.String name, Output id, @Nullable ServiceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:domainservices/service:Service", name, state, makeResourceOptions(options, id), false); } private static ServiceArgs makeArgs(ServiceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ServiceArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static Service get(java.lang.String name, Output id, @Nullable ServiceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Service(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy