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

com.ovhcloud.pulumi.ovh.Vrack.IpAddress Maven / Gradle / Ivy

There is a newer version: 1.1.0
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.ovhcloud.pulumi.ovh.Vrack;

import com.ovhcloud.pulumi.ovh.Utilities;
import com.ovhcloud.pulumi.ovh.Vrack.IpAddressArgs;
import com.ovhcloud.pulumi.ovh.Vrack.inputs.IpAddressState;
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;

/**
 * Attach an IP block to a VRack.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.ovh.Me.MeFunctions;
 * import com.pulumi.ovh.Order.OrderFunctions;
 * import com.pulumi.ovh.Order.inputs.GetCartArgs;
 * import com.pulumi.ovh.Order.inputs.GetCartProductPlanArgs;
 * import com.pulumi.ovh.Vrack.Vrack;
 * import com.pulumi.ovh.Vrack.VrackArgs;
 * import com.pulumi.ovh.Vrack.inputs.VrackPlanArgs;
 * import com.pulumi.ovh.Ip.IpService;
 * import com.pulumi.ovh.Ip.IpServiceArgs;
 * import com.pulumi.ovh.Ip.inputs.IpServicePlanArgs;
 * import com.pulumi.ovh.Vrack.IpAddress;
 * import com.pulumi.ovh.Vrack.IpAddressArgs;
 * 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 myaccount = MeFunctions.getMe();
 * 
 *         final var mycart = OrderFunctions.getCart(GetCartArgs.builder()
 *             .ovhSubsidiary(myaccount.applyValue(getMeResult -> getMeResult.ovhSubsidiary()))
 *             .build());
 * 
 *         final var vrackCartProductPlan = OrderFunctions.getCartProductPlan(GetCartProductPlanArgs.builder()
 *             .cartId(mycart.applyValue(getCartResult -> getCartResult.id()))
 *             .priceCapacity("renew")
 *             .product("vrack")
 *             .planCode("vrack")
 *             .build());
 * 
 *         var vrackVrack = new Vrack("vrackVrack", VrackArgs.builder()
 *             .description(mycart.applyValue(getCartResult -> getCartResult.description()))
 *             .ovhSubsidiary(mycart.applyValue(getCartResult -> getCartResult.ovhSubsidiary()))
 *             .plan(VrackPlanArgs.builder()
 *                 .duration(vrackCartProductPlan.applyValue(getCartProductPlanResult -> getCartProductPlanResult.selectedPrices()[0].duration()))
 *                 .planCode(vrackCartProductPlan.applyValue(getCartProductPlanResult -> getCartProductPlanResult.planCode()))
 *                 .pricingMode(vrackCartProductPlan.applyValue(getCartProductPlanResult -> getCartProductPlanResult.selectedPrices()[0].pricingMode()))
 *                 .build())
 *             .build());
 * 
 *         final var ipblockCartProductPlan = OrderFunctions.getCartProductPlan(GetCartProductPlanArgs.builder()
 *             .cartId(mycart.applyValue(getCartResult -> getCartResult.id()))
 *             .priceCapacity("renew")
 *             .product("ip")
 *             .planCode("ip-v4-s30-ripe")
 *             .build());
 * 
 *         var ipblockIpService = new IpService("ipblockIpService", IpServiceArgs.builder()
 *             .ovhSubsidiary(mycart.applyValue(getCartResult -> getCartResult.ovhSubsidiary()))
 *             .description(mycart.applyValue(getCartResult -> getCartResult.description()))
 *             .plan(IpServicePlanArgs.builder()
 *                 .duration(ipblockCartProductPlan.applyValue(getCartProductPlanResult -> getCartProductPlanResult.selectedPrices()[0].duration()))
 *                 .planCode(ipblockCartProductPlan.applyValue(getCartProductPlanResult -> getCartProductPlanResult.planCode()))
 *                 .pricingMode(ipblockCartProductPlan.applyValue(getCartProductPlanResult -> getCartProductPlanResult.selectedPrices()[0].pricingMode()))
 *                 .configurations(IpServicePlanConfigurationArgs.builder()
 *                     .label("country")
 *                     .value("FR")
 *                     .build())
 *                 .build())
 *             .build());
 * 
 *         var vrackblock = new IpAddress("vrackblock", IpAddressArgs.builder()
 *             .serviceName(vrackVrack.serviceName())
 *             .block(ipblockIpService.ip())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * */ @ResourceType(type="ovh:Vrack/ipAddress:IpAddress") public class IpAddress extends com.pulumi.resources.CustomResource { /** * Your IP block. * */ @Export(name="block", refs={String.class}, tree="[0]") private Output block; /** * @return Your IP block. * */ public Output block() { return this.block; } /** * Your gateway * */ @Export(name="gateway", refs={String.class}, tree="[0]") private Output gateway; /** * @return Your gateway * */ public Output gateway() { return this.gateway; } /** * Your IP block * */ @Export(name="ip", refs={String.class}, tree="[0]") private Output ip; /** * @return Your IP block * */ public Output ip() { return this.ip; } /** * The internal name of your vrack * */ @Export(name="serviceName", refs={String.class}, tree="[0]") private Output serviceName; /** * @return The internal name of your vrack * */ public Output serviceName() { return this.serviceName; } /** * Where you want your block announced on the network * */ @Export(name="zone", refs={String.class}, tree="[0]") private Output zone; /** * @return Where you want your block announced on the network * */ public Output zone() { return this.zone; } /** * * @param name The _unique_ name of the resulting resource. */ public IpAddress(java.lang.String name) { this(name, IpAddressArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public IpAddress(java.lang.String name, IpAddressArgs 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 IpAddress(java.lang.String name, IpAddressArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("ovh:Vrack/ipAddress:IpAddress", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private IpAddress(java.lang.String name, Output id, @Nullable IpAddressState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("ovh:Vrack/ipAddress:IpAddress", name, state, makeResourceOptions(options, id), false); } private static IpAddressArgs makeArgs(IpAddressArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? IpAddressArgs.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 IpAddress get(java.lang.String name, Output id, @Nullable IpAddressState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new IpAddress(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy