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

com.pulumi.azure.communication.ServiceEmailDomainAssociation Maven / Gradle / Ivy

// *** 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.communication;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.communication.ServiceEmailDomainAssociationArgs;
import com.pulumi.azure.communication.inputs.ServiceEmailDomainAssociationState;
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.String;
import javax.annotation.Nullable;

/**
 * Manages a communication service email domain association.
 * 
 * ## 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.communication.Service;
 * import com.pulumi.azure.communication.ServiceArgs;
 * import com.pulumi.azure.communication.EmailService;
 * import com.pulumi.azure.communication.EmailServiceArgs;
 * import com.pulumi.azure.communication.EmailServiceDomain;
 * import com.pulumi.azure.communication.EmailServiceDomainArgs;
 * import com.pulumi.azure.communication.ServiceEmailDomainAssociation;
 * import com.pulumi.azure.communication.ServiceEmailDomainAssociationArgs;
 * 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) {
 *         var example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("group1")
 *             .location("West Europe")
 *             .build());
 * 
 *         var exampleService = new Service("exampleService", ServiceArgs.builder()
 *             .name("CommunicationService1")
 *             .resourceGroupName(example.name())
 *             .dataLocation("United States")
 *             .build());
 * 
 *         var exampleEmailService = new EmailService("exampleEmailService", EmailServiceArgs.builder()
 *             .name("emailCommunicationService1")
 *             .resourceGroupName(example.name())
 *             .dataLocation("United States")
 *             .build());
 * 
 *         var exampleEmailServiceDomain = new EmailServiceDomain("exampleEmailServiceDomain", EmailServiceDomainArgs.builder()
 *             .name("AzureManagedDomain")
 *             .emailServiceId(exampleEmailService.id())
 *             .domainManagement("AzureManaged")
 *             .build());
 * 
 *         var exampleServiceEmailDomainAssociation = new ServiceEmailDomainAssociation("exampleServiceEmailDomainAssociation", ServiceEmailDomainAssociationArgs.builder()
 *             .communicationServiceId(exampleService.id())
 *             .emailServiceDomainId(exampleEmailServiceDomain.id())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Communication service email domain association can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:communication/serviceEmailDomainAssociation:ServiceEmailDomainAssociation example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Communication/communicationServices/communicationService1|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Communication/emailServices/emailCommunicationService1/domains/domain1" * ``` * */ @ResourceType(type="azure:communication/serviceEmailDomainAssociation:ServiceEmailDomainAssociation") public class ServiceEmailDomainAssociation extends com.pulumi.resources.CustomResource { /** * The ID of the Communication Service. Changing this forces a new communication service email domain association to be created. * */ @Export(name="communicationServiceId", refs={String.class}, tree="[0]") private Output communicationServiceId; /** * @return The ID of the Communication Service. Changing this forces a new communication service email domain association to be created. * */ public Output communicationServiceId() { return this.communicationServiceId; } /** * The ID of the EMail Service Domain. Changing this forces a new communication service email domain association to be created. * */ @Export(name="emailServiceDomainId", refs={String.class}, tree="[0]") private Output emailServiceDomainId; /** * @return The ID of the EMail Service Domain. Changing this forces a new communication service email domain association to be created. * */ public Output emailServiceDomainId() { return this.emailServiceDomainId; } /** * * @param name The _unique_ name of the resulting resource. */ public ServiceEmailDomainAssociation(java.lang.String name) { this(name, ServiceEmailDomainAssociationArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ServiceEmailDomainAssociation(java.lang.String name, ServiceEmailDomainAssociationArgs 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 ServiceEmailDomainAssociation(java.lang.String name, ServiceEmailDomainAssociationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:communication/serviceEmailDomainAssociation:ServiceEmailDomainAssociation", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ServiceEmailDomainAssociation(java.lang.String name, Output id, @Nullable ServiceEmailDomainAssociationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:communication/serviceEmailDomainAssociation:ServiceEmailDomainAssociation", name, state, makeResourceOptions(options, id), false); } private static ServiceEmailDomainAssociationArgs makeArgs(ServiceEmailDomainAssociationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ServiceEmailDomainAssociationArgs.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 ServiceEmailDomainAssociation get(java.lang.String name, Output id, @Nullable ServiceEmailDomainAssociationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ServiceEmailDomainAssociation(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy