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

com.pulumi.alicloud.fc.V3VpcBinding Maven / Gradle / Ivy

There is a newer version: 3.63.0-alpha.1727424957
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.alicloud.fc;

import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.fc.V3VpcBindingArgs;
import com.pulumi.alicloud.fc.inputs.V3VpcBindingState;
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;

/**
 * Provides a FCV3 Vpc Binding resource.
 * 
 * For information about FCV3 Vpc Binding and how to use it, see [What is Vpc Binding](https://www.alibabacloud.com/help/en/functioncompute/fc-3-0/developer-reference/api-fc-2023-03-30-createvpcbinding).
 * 
 * > **NOTE:** Available since v1.230.0.
 * 
 * ## Example Usage
 * 
 * Basic Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.alicloud.vpc.Network;
 * import com.pulumi.alicloud.vpc.NetworkArgs;
 * import com.pulumi.alicloud.fc.V3Function;
 * import com.pulumi.alicloud.fc.V3FunctionArgs;
 * import com.pulumi.alicloud.fc.inputs.V3FunctionCodeArgs;
 * import com.pulumi.alicloud.fc.inputs.V3FunctionLogConfigArgs;
 * import com.pulumi.alicloud.fc.V3VpcBinding;
 * import com.pulumi.alicloud.fc.V3VpcBindingArgs;
 * 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 config = ctx.config();
 *         final var name = config.get("name").orElse("terraform-example");
 *         var vpc = new Network("vpc", NetworkArgs.builder()
 *             .cidrBlock("10.0.0.0/8")
 *             .vpcName(name)
 *             .build());
 * 
 *         var function = new V3Function("function", V3FunctionArgs.builder()
 *             .memorySize("512")
 *             .cpu(0.5)
 *             .handler("index.Handler")
 *             .code(V3FunctionCodeArgs.builder()
 *                 .zipFile("UEsDBBQACAAIAAAAAAAAAAAAAAAAAAAAAAAIAAAAaW5kZXgucHmEkEFKxEAQRfd9ig9ZTCJOooIwDMwNXLqXnnQlaalUhU5lRj2KZ/FOXkESGR114bJ/P/7jV4b1xRq1hijtFpM1682cuNgPmgysbRulPT0fRxXnMtwrSPyeCdYRokSLnuMLJTTkbUqEvDMbxm1VdcRD6Tk+T1LW2ldB66knsYdA5iNX17ebm6tN2VnPhcswMPmREPuBacb+CiapLarAj9gT6/H97dVlCNScY3mtYvRkxdZlwDKDEnanPWVLdrdkeXEGlFEazVdfPVHaVeHc3N15CUwppwOJXeK7HshAB8NuOU7J6sP4SRXuH/EvbUfMiqMmDqv5M5FNSfAj/wgAAP//UEsHCPl//NYAAQAArwEAAFBLAQIUABQACAAIAAAAAAD5f/zWAAEAAK8BAAAIAAAAAAAAAAAAAAAAAAAAAABpbmRleC5weVBLBQYAAAAAAQABADYAAAA2AQAAAAA=")
 *                 .build())
 *             .functionName(name)
 *             .runtime("python3.9")
 *             .diskSize("512")
 *             .logConfig(V3FunctionLogConfigArgs.builder()
 *                 .logBeginRule("None")
 *                 .build())
 *             .build());
 * 
 *         var default_ = new V3VpcBinding("default", V3VpcBindingArgs.builder()
 *             .functionName(function.functionName())
 *             .vpcId(vpc.id())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * FCV3 Vpc Binding can be imported using the id, e.g. * * ```sh * $ pulumi import alicloud:fc/v3VpcBinding:V3VpcBinding example <function_name>:<vpc_id> * ``` * */ @ResourceType(type="alicloud:fc/v3VpcBinding:V3VpcBinding") public class V3VpcBinding extends com.pulumi.resources.CustomResource { /** * Function Name * */ @Export(name="functionName", refs={String.class}, tree="[0]") private Output functionName; /** * @return Function Name * */ public Output functionName() { return this.functionName; } /** * VPC instance ID * */ @Export(name="vpcId", refs={String.class}, tree="[0]") private Output vpcId; /** * @return VPC instance ID * */ public Output vpcId() { return this.vpcId; } /** * * @param name The _unique_ name of the resulting resource. */ public V3VpcBinding(java.lang.String name) { this(name, V3VpcBindingArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public V3VpcBinding(java.lang.String name, V3VpcBindingArgs 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 V3VpcBinding(java.lang.String name, V3VpcBindingArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:fc/v3VpcBinding:V3VpcBinding", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private V3VpcBinding(java.lang.String name, Output id, @Nullable V3VpcBindingState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:fc/v3VpcBinding:V3VpcBinding", name, state, makeResourceOptions(options, id), false); } private static V3VpcBindingArgs makeArgs(V3VpcBindingArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? V3VpcBindingArgs.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 V3VpcBinding get(java.lang.String name, Output id, @Nullable V3VpcBindingState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new V3VpcBinding(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy