com.pulumi.alicloud.pvtz.Rule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alicloud Show documentation
Show all versions of alicloud Show documentation
A Pulumi package for creating and managing AliCloud 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.alicloud.pvtz;
import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.pvtz.RuleArgs;
import com.pulumi.alicloud.pvtz.inputs.RuleState;
import com.pulumi.alicloud.pvtz.outputs.RuleForwardIp;
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 java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Provides a Private Zone Rule resource.
*
* For information about Private Zone Rule and how to use it, see [What is Rule](https://www.alibabacloud.com/help/en/privatezone/latest/add-forwarding-rule).
*
* > **NOTE:** Available since v1.143.0.
*
* ## Import
*
* Private Zone Rule can be imported using the id, e.g.
*
* ```sh
* $ pulumi import alicloud:pvtz/rule:Rule example <id>
* ```
*
*/
@ResourceType(type="alicloud:pvtz/rule:Rule")
public class Rule extends com.pulumi.resources.CustomResource {
/**
* The ID of the Endpoint.
*
*/
@Export(name="endpointId", refs={String.class}, tree="[0]")
private Output endpointId;
/**
* @return The ID of the Endpoint.
*
*/
public Output endpointId() {
return this.endpointId;
}
/**
* Forwarding target. See `forward_ips` below.
*
*/
@Export(name="forwardIps", refs={List.class,RuleForwardIp.class}, tree="[0,1]")
private Output> forwardIps;
/**
* @return Forwarding target. See `forward_ips` below.
*
*/
public Output> forwardIps() {
return this.forwardIps;
}
/**
* The name of the resource.
*
*/
@Export(name="ruleName", refs={String.class}, tree="[0]")
private Output ruleName;
/**
* @return The name of the resource.
*
*/
public Output ruleName() {
return this.ruleName;
}
/**
* The type of the rule. Valid values: `OUTBOUND`.
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> type;
/**
* @return The type of the rule. Valid values: `OUTBOUND`.
*
*/
public Output> type() {
return Codegen.optional(this.type);
}
/**
* The name of the forwarding zone.
*
*/
@Export(name="zoneName", refs={String.class}, tree="[0]")
private Output zoneName;
/**
* @return The name of the forwarding zone.
*
*/
public Output zoneName() {
return this.zoneName;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public Rule(java.lang.String name) {
this(name, RuleArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public Rule(java.lang.String name, RuleArgs 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 Rule(java.lang.String name, RuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("alicloud:pvtz/rule:Rule", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private Rule(java.lang.String name, Output id, @Nullable RuleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("alicloud:pvtz/rule:Rule", name, state, makeResourceOptions(options, id), false);
}
private static RuleArgs makeArgs(RuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? RuleArgs.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 Rule get(java.lang.String name, Output id, @Nullable RuleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new Rule(name, id, state, options);
}
}