com.pulumi.azurenative.domainregistration.Domain Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** 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.azurenative.domainregistration;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.domainregistration.DomainArgs;
import com.pulumi.azurenative.domainregistration.outputs.HostNameResponse;
import com.pulumi.core.Alias;
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.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Information about a domain.
* Azure REST API version: 2022-09-01. Prior API version in Azure Native 1.x: 2020-10-01.
*
* Other available API versions: 2020-10-01, 2023-01-01, 2023-12-01.
*
* ## Example Usage
* ### Create App Service Domain
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.domainregistration.Domain;
* import com.pulumi.azurenative.domainregistration.DomainArgs;
* import com.pulumi.azurenative.domainregistration.inputs.DomainPurchaseConsentArgs;
* import com.pulumi.azurenative.domainregistration.inputs.ContactArgs;
* import com.pulumi.azurenative.domainregistration.inputs.AddressArgs;
* 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 domain = new Domain("domain", DomainArgs.builder()
* .authCode("exampleAuthCode")
* .autoRenew(true)
* .consent(DomainPurchaseConsentArgs.builder()
* .agreedAt("2021-09-10T19:30:53Z")
* .agreedBy("192.0.2.1")
* .agreementKeys("agreementKey1")
* .build())
* .contactAdmin(ContactArgs.builder()
* .addressMailing(AddressArgs.builder()
* .address1("3400 State St")
* .city("Chicago")
* .country("United States")
* .postalCode("67098")
* .state("IL")
* .build())
* .email("admin}{@literal @}{@code email.com")
* .fax("1-245-534-2242")
* .jobTitle("Admin")
* .nameFirst("John")
* .nameLast("Doe")
* .nameMiddle("")
* .organization("Microsoft Inc.")
* .phone("1-245-534-2242")
* .build())
* .contactBilling(ContactArgs.builder()
* .addressMailing(AddressArgs.builder()
* .address1("3400 State St")
* .city("Chicago")
* .country("United States")
* .postalCode("67098")
* .state("IL")
* .build())
* .email("billing}{@literal @}{@code email.com")
* .fax("1-245-534-2242")
* .jobTitle("Billing")
* .nameFirst("John")
* .nameLast("Doe")
* .nameMiddle("")
* .organization("Microsoft Inc.")
* .phone("1-245-534-2242")
* .build())
* .contactRegistrant(ContactArgs.builder()
* .addressMailing(AddressArgs.builder()
* .address1("3400 State St")
* .city("Chicago")
* .country("United States")
* .postalCode("67098")
* .state("IL")
* .build())
* .email("registrant}{@literal @}{@code email.com")
* .fax("1-245-534-2242")
* .jobTitle("Registrant")
* .nameFirst("John")
* .nameLast("Doe")
* .nameMiddle("")
* .organization("Microsoft Inc.")
* .phone("1-245-534-2242")
* .build())
* .contactTech(ContactArgs.builder()
* .addressMailing(AddressArgs.builder()
* .address1("3400 State St")
* .city("Chicago")
* .country("United States")
* .postalCode("67098")
* .state("IL")
* .build())
* .email("tech}{@literal @}{@code email.com")
* .fax("1-245-534-2242")
* .jobTitle("Tech")
* .nameFirst("John")
* .nameLast("Doe")
* .nameMiddle("")
* .organization("Microsoft Inc.")
* .phone("1-245-534-2242")
* .build())
* .dnsType("DefaultDomainRegistrarDns")
* .domainName("example.com")
* .location("global")
* .privacy(false)
* .resourceGroupName("testrg123")
* .tags()
* .build());
*
* }}{@code
* }}{@code
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:domainregistration:Domain example.com /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}
* ```
*
*/
@ResourceType(type="azure-native:domainregistration:Domain")
public class Domain extends com.pulumi.resources.CustomResource {
@Export(name="authCode", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> authCode;
public Output> authCode() {
return Codegen.optional(this.authCode);
}
/**
* <code>true</code> if the domain should be automatically renewed; otherwise, <code>false</code>.
*
*/
@Export(name="autoRenew", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> autoRenew;
/**
* @return <code>true</code> if the domain should be automatically renewed; otherwise, <code>false</code>.
*
*/
public Output> autoRenew() {
return Codegen.optional(this.autoRenew);
}
/**
* Domain creation timestamp.
*
*/
@Export(name="createdTime", refs={String.class}, tree="[0]")
private Output createdTime;
/**
* @return Domain creation timestamp.
*
*/
public Output createdTime() {
return this.createdTime;
}
/**
* Current DNS type
*
*/
@Export(name="dnsType", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> dnsType;
/**
* @return Current DNS type
*
*/
public Output> dnsType() {
return Codegen.optional(this.dnsType);
}
/**
* Azure DNS Zone to use
*
*/
@Export(name="dnsZoneId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> dnsZoneId;
/**
* @return Azure DNS Zone to use
*
*/
public Output> dnsZoneId() {
return Codegen.optional(this.dnsZoneId);
}
/**
* Reasons why domain is not renewable.
*
*/
@Export(name="domainNotRenewableReasons", refs={List.class,String.class}, tree="[0,1]")
private Output> domainNotRenewableReasons;
/**
* @return Reasons why domain is not renewable.
*
*/
public Output> domainNotRenewableReasons() {
return this.domainNotRenewableReasons;
}
/**
* Domain expiration timestamp.
*
*/
@Export(name="expirationTime", refs={String.class}, tree="[0]")
private Output expirationTime;
/**
* @return Domain expiration timestamp.
*
*/
public Output expirationTime() {
return this.expirationTime;
}
/**
* Kind of resource.
*
*/
@Export(name="kind", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> kind;
/**
* @return Kind of resource.
*
*/
public Output> kind() {
return Codegen.optional(this.kind);
}
/**
* Timestamp when the domain was renewed last time.
*
*/
@Export(name="lastRenewedTime", refs={String.class}, tree="[0]")
private Output lastRenewedTime;
/**
* @return Timestamp when the domain was renewed last time.
*
*/
public Output lastRenewedTime() {
return this.lastRenewedTime;
}
/**
* Resource Location.
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output location;
/**
* @return Resource Location.
*
*/
public Output location() {
return this.location;
}
/**
* All hostnames derived from the domain and assigned to Azure resources.
*
*/
@Export(name="managedHostNames", refs={List.class,HostNameResponse.class}, tree="[0,1]")
private Output> managedHostNames;
/**
* @return All hostnames derived from the domain and assigned to Azure resources.
*
*/
public Output> managedHostNames() {
return this.managedHostNames;
}
/**
* Resource Name.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Resource Name.
*
*/
public Output name() {
return this.name;
}
/**
* Name servers.
*
*/
@Export(name="nameServers", refs={List.class,String.class}, tree="[0,1]")
private Output> nameServers;
/**
* @return Name servers.
*
*/
public Output> nameServers() {
return this.nameServers;
}
/**
* <code>true</code> if domain privacy is enabled for this domain; otherwise, <code>false</code>.
*
*/
@Export(name="privacy", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> privacy;
/**
* @return <code>true</code> if domain privacy is enabled for this domain; otherwise, <code>false</code>.
*
*/
public Output> privacy() {
return Codegen.optional(this.privacy);
}
/**
* Domain provisioning state.
*
*/
@Export(name="provisioningState", refs={String.class}, tree="[0]")
private Output provisioningState;
/**
* @return Domain provisioning state.
*
*/
public Output provisioningState() {
return this.provisioningState;
}
/**
* <code>true</code> if Azure can assign this domain to App Service apps; otherwise, <code>false</code>. This value will be <code>true</code> if domain registration status is active and
* it is hosted on name servers Azure has programmatic access to.
*
*/
@Export(name="readyForDnsRecordManagement", refs={Boolean.class}, tree="[0]")
private Output readyForDnsRecordManagement;
/**
* @return <code>true</code> if Azure can assign this domain to App Service apps; otherwise, <code>false</code>. This value will be <code>true</code> if domain registration status is active and
* it is hosted on name servers Azure has programmatic access to.
*
*/
public Output readyForDnsRecordManagement() {
return this.readyForDnsRecordManagement;
}
/**
* Domain registration status.
*
*/
@Export(name="registrationStatus", refs={String.class}, tree="[0]")
private Output registrationStatus;
/**
* @return Domain registration status.
*
*/
public Output registrationStatus() {
return this.registrationStatus;
}
/**
* Resource tags.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return Resource tags.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* Target DNS type (would be used for migration)
*
*/
@Export(name="targetDnsType", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> targetDnsType;
/**
* @return Target DNS type (would be used for migration)
*
*/
public Output> targetDnsType() {
return Codegen.optional(this.targetDnsType);
}
/**
* Resource type.
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return Resource type.
*
*/
public Output type() {
return this.type;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public Domain(java.lang.String name) {
this(name, DomainArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public Domain(java.lang.String name, DomainArgs 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 Domain(java.lang.String name, DomainArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:domainregistration:Domain", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private Domain(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:domainregistration:Domain", name, null, makeResourceOptions(options, id), false);
}
private static DomainArgs makeArgs(DomainArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? DomainArgs.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())
.aliases(List.of(
Output.of(Alias.builder().type("azure-native:domainregistration/v20150401:Domain").build()),
Output.of(Alias.builder().type("azure-native:domainregistration/v20180201:Domain").build()),
Output.of(Alias.builder().type("azure-native:domainregistration/v20190801:Domain").build()),
Output.of(Alias.builder().type("azure-native:domainregistration/v20200601:Domain").build()),
Output.of(Alias.builder().type("azure-native:domainregistration/v20200901:Domain").build()),
Output.of(Alias.builder().type("azure-native:domainregistration/v20201001:Domain").build()),
Output.of(Alias.builder().type("azure-native:domainregistration/v20201201:Domain").build()),
Output.of(Alias.builder().type("azure-native:domainregistration/v20210101:Domain").build()),
Output.of(Alias.builder().type("azure-native:domainregistration/v20210115:Domain").build()),
Output.of(Alias.builder().type("azure-native:domainregistration/v20210201:Domain").build()),
Output.of(Alias.builder().type("azure-native:domainregistration/v20210301:Domain").build()),
Output.of(Alias.builder().type("azure-native:domainregistration/v20220301:Domain").build()),
Output.of(Alias.builder().type("azure-native:domainregistration/v20220901:Domain").build()),
Output.of(Alias.builder().type("azure-native:domainregistration/v20230101:Domain").build()),
Output.of(Alias.builder().type("azure-native:domainregistration/v20231201:Domain").build())
))
.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 options Optional settings to control the behavior of the CustomResource.
*/
public static Domain get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new Domain(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy