com.pulumi.azurenative.network.CustomIPPrefix 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.network;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.network.CustomIPPrefixArgs;
import com.pulumi.azurenative.network.outputs.ExtendedLocationResponse;
import com.pulumi.azurenative.network.outputs.SubResourceResponse;
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;
/**
* Custom IP prefix resource.
* Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-11-01.
*
* Other available API versions: 2021-03-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-03-01.
*
* ## Example Usage
* ### Create custom IP prefix allocation method
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.network.CustomIPPrefix;
* import com.pulumi.azurenative.network.CustomIPPrefixArgs;
* 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 customIPPrefix = new CustomIPPrefix("customIPPrefix", CustomIPPrefixArgs.builder()
* .cidr("0.0.0.0/24")
* .customIpPrefixName("test-customipprefix")
* .location("westus")
* .resourceGroupName("rg1")
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:network:CustomIPPrefix test-customipprefix /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}
* ```
*
*/
@ResourceType(type="azure-native:network:CustomIPPrefix")
public class CustomIPPrefix extends com.pulumi.resources.CustomResource {
/**
* The ASN for CIDR advertising. Should be an integer as string.
*
*/
@Export(name="asn", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> asn;
/**
* @return The ASN for CIDR advertising. Should be an integer as string.
*
*/
public Output> asn() {
return Codegen.optional(this.asn);
}
/**
* Authorization message for WAN validation.
*
*/
@Export(name="authorizationMessage", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> authorizationMessage;
/**
* @return Authorization message for WAN validation.
*
*/
public Output> authorizationMessage() {
return Codegen.optional(this.authorizationMessage);
}
/**
* The list of all Children for IPv6 /48 CustomIpPrefix.
*
*/
@Export(name="childCustomIpPrefixes", refs={List.class,SubResourceResponse.class}, tree="[0,1]")
private Output> childCustomIpPrefixes;
/**
* @return The list of all Children for IPv6 /48 CustomIpPrefix.
*
*/
public Output> childCustomIpPrefixes() {
return this.childCustomIpPrefixes;
}
/**
* The prefix range in CIDR notation. Should include the start address and the prefix length.
*
*/
@Export(name="cidr", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> cidr;
/**
* @return The prefix range in CIDR notation. Should include the start address and the prefix length.
*
*/
public Output> cidr() {
return Codegen.optional(this.cidr);
}
/**
* The commissioned state of the Custom IP Prefix.
*
*/
@Export(name="commissionedState", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> commissionedState;
/**
* @return The commissioned state of the Custom IP Prefix.
*
*/
public Output> commissionedState() {
return Codegen.optional(this.commissionedState);
}
/**
* The Parent CustomIpPrefix for IPv6 /64 CustomIpPrefix.
*
*/
@Export(name="customIpPrefixParent", refs={SubResourceResponse.class}, tree="[0]")
private Output* @Nullable */ SubResourceResponse> customIpPrefixParent;
/**
* @return The Parent CustomIpPrefix for IPv6 /64 CustomIpPrefix.
*
*/
public Output> customIpPrefixParent() {
return Codegen.optional(this.customIpPrefixParent);
}
/**
* A unique read-only string that changes whenever the resource is updated.
*
*/
@Export(name="etag", refs={String.class}, tree="[0]")
private Output etag;
/**
* @return A unique read-only string that changes whenever the resource is updated.
*
*/
public Output etag() {
return this.etag;
}
/**
* Whether to do express route advertise.
*
*/
@Export(name="expressRouteAdvertise", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> expressRouteAdvertise;
/**
* @return Whether to do express route advertise.
*
*/
public Output> expressRouteAdvertise() {
return Codegen.optional(this.expressRouteAdvertise);
}
/**
* The extended location of the custom IP prefix.
*
*/
@Export(name="extendedLocation", refs={ExtendedLocationResponse.class}, tree="[0]")
private Output* @Nullable */ ExtendedLocationResponse> extendedLocation;
/**
* @return The extended location of the custom IP prefix.
*
*/
public Output> extendedLocation() {
return Codegen.optional(this.extendedLocation);
}
/**
* The reason why resource is in failed state.
*
*/
@Export(name="failedReason", refs={String.class}, tree="[0]")
private Output failedReason;
/**
* @return The reason why resource is in failed state.
*
*/
public Output failedReason() {
return this.failedReason;
}
/**
* The Geo for CIDR advertising. Should be an Geo code.
*
*/
@Export(name="geo", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> geo;
/**
* @return The Geo for CIDR advertising. Should be an Geo code.
*
*/
public Output> geo() {
return Codegen.optional(this.geo);
}
/**
* Resource location.
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> location;
/**
* @return Resource location.
*
*/
public Output> location() {
return Codegen.optional(this.location);
}
/**
* Resource name.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Resource name.
*
*/
public Output name() {
return this.name;
}
/**
* Whether to Advertise the range to Internet.
*
*/
@Export(name="noInternetAdvertise", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> noInternetAdvertise;
/**
* @return Whether to Advertise the range to Internet.
*
*/
public Output> noInternetAdvertise() {
return Codegen.optional(this.noInternetAdvertise);
}
/**
* Type of custom IP prefix. Should be Singular, Parent, or Child.
*
*/
@Export(name="prefixType", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> prefixType;
/**
* @return Type of custom IP prefix. Should be Singular, Parent, or Child.
*
*/
public Output> prefixType() {
return Codegen.optional(this.prefixType);
}
/**
* The provisioning state of the custom IP prefix resource.
*
*/
@Export(name="provisioningState", refs={String.class}, tree="[0]")
private Output provisioningState;
/**
* @return The provisioning state of the custom IP prefix resource.
*
*/
public Output provisioningState() {
return this.provisioningState;
}
/**
* The list of all referenced PublicIpPrefixes.
*
*/
@Export(name="publicIpPrefixes", refs={List.class,SubResourceResponse.class}, tree="[0,1]")
private Output> publicIpPrefixes;
/**
* @return The list of all referenced PublicIpPrefixes.
*
*/
public Output> publicIpPrefixes() {
return this.publicIpPrefixes;
}
/**
* The resource GUID property of the custom IP prefix resource.
*
*/
@Export(name="resourceGuid", refs={String.class}, tree="[0]")
private Output resourceGuid;
/**
* @return The resource GUID property of the custom IP prefix resource.
*
*/
public Output resourceGuid() {
return this.resourceGuid;
}
/**
* Signed message for WAN validation.
*
*/
@Export(name="signedMessage", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> signedMessage;
/**
* @return Signed message for WAN validation.
*
*/
public Output> signedMessage() {
return Codegen.optional(this.signedMessage);
}
/**
* 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);
}
/**
* Resource type.
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return Resource type.
*
*/
public Output type() {
return this.type;
}
/**
* A list of availability zones denoting the IP allocated for the resource needs to come from.
*
*/
@Export(name="zones", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> zones;
/**
* @return A list of availability zones denoting the IP allocated for the resource needs to come from.
*
*/
public Output>> zones() {
return Codegen.optional(this.zones);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public CustomIPPrefix(java.lang.String name) {
this(name, CustomIPPrefixArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public CustomIPPrefix(java.lang.String name, CustomIPPrefixArgs 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 CustomIPPrefix(java.lang.String name, CustomIPPrefixArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:network:CustomIPPrefix", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private CustomIPPrefix(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:network:CustomIPPrefix", name, null, makeResourceOptions(options, id), false);
}
private static CustomIPPrefixArgs makeArgs(CustomIPPrefixArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? CustomIPPrefixArgs.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:network/v20200601:CustomIPPrefix").build()),
Output.of(Alias.builder().type("azure-native:network/v20200701:CustomIPPrefix").build()),
Output.of(Alias.builder().type("azure-native:network/v20200801:CustomIPPrefix").build()),
Output.of(Alias.builder().type("azure-native:network/v20201101:CustomIPPrefix").build()),
Output.of(Alias.builder().type("azure-native:network/v20210201:CustomIPPrefix").build()),
Output.of(Alias.builder().type("azure-native:network/v20210301:CustomIPPrefix").build()),
Output.of(Alias.builder().type("azure-native:network/v20210501:CustomIPPrefix").build()),
Output.of(Alias.builder().type("azure-native:network/v20210801:CustomIPPrefix").build()),
Output.of(Alias.builder().type("azure-native:network/v20220101:CustomIPPrefix").build()),
Output.of(Alias.builder().type("azure-native:network/v20220501:CustomIPPrefix").build()),
Output.of(Alias.builder().type("azure-native:network/v20220701:CustomIPPrefix").build()),
Output.of(Alias.builder().type("azure-native:network/v20220901:CustomIPPrefix").build()),
Output.of(Alias.builder().type("azure-native:network/v20221101:CustomIPPrefix").build()),
Output.of(Alias.builder().type("azure-native:network/v20230201:CustomIPPrefix").build()),
Output.of(Alias.builder().type("azure-native:network/v20230401:CustomIPPrefix").build()),
Output.of(Alias.builder().type("azure-native:network/v20230501:CustomIPPrefix").build()),
Output.of(Alias.builder().type("azure-native:network/v20230601:CustomIPPrefix").build()),
Output.of(Alias.builder().type("azure-native:network/v20230901:CustomIPPrefix").build()),
Output.of(Alias.builder().type("azure-native:network/v20231101:CustomIPPrefix").build()),
Output.of(Alias.builder().type("azure-native:network/v20240101:CustomIPPrefix").build()),
Output.of(Alias.builder().type("azure-native:network/v20240301:CustomIPPrefix").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 CustomIPPrefix get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new CustomIPPrefix(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy