alicloud.pvtz.Rule
Explore with Pulumi AI
Provides a Private Zone Rule resource.
For information about Private Zone Rule and how to use it, see What is Rule.
NOTE: Available since v1.143.0.
Create Rule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Rule(name: string, args: RuleArgs, opts?: CustomResourceOptions);
@overload
def Rule(resource_name: str,
args: RuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Rule(resource_name: str,
opts: Optional[ResourceOptions] = None,
endpoint_id: Optional[str] = None,
forward_ips: Optional[Sequence[RuleForwardIpArgs]] = None,
rule_name: Optional[str] = None,
zone_name: Optional[str] = None,
type: Optional[str] = None)
func NewRule(ctx *Context, name string, args RuleArgs, opts ...ResourceOption) (*Rule, error)
public Rule(string name, RuleArgs args, CustomResourceOptions? opts = null)
type: alicloud:pvtz:Rule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args RuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args RuleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var exampleruleResourceResourceFromPvtzrule = new AliCloud.Pvtz.Rule("exampleruleResourceResourceFromPvtzrule", new()
{
EndpointId = "string",
ForwardIps = new[]
{
new AliCloud.Pvtz.Inputs.RuleForwardIpArgs
{
Ip = "string",
Port = 0,
},
},
RuleName = "string",
ZoneName = "string",
Type = "string",
});
example, err := pvtz.NewRule(ctx, "exampleruleResourceResourceFromPvtzrule", &pvtz.RuleArgs{
EndpointId: pulumi.String("string"),
ForwardIps: pvtz.RuleForwardIpArray{
&pvtz.RuleForwardIpArgs{
Ip: pulumi.String("string"),
Port: pulumi.Int(0),
},
},
RuleName: pulumi.String("string"),
ZoneName: pulumi.String("string"),
Type: pulumi.String("string"),
})
var exampleruleResourceResourceFromPvtzrule = new Rule("exampleruleResourceResourceFromPvtzrule", RuleArgs.builder()
.endpointId("string")
.forwardIps(RuleForwardIpArgs.builder()
.ip("string")
.port(0)
.build())
.ruleName("string")
.zoneName("string")
.type("string")
.build());
examplerule_resource_resource_from_pvtzrule = alicloud.pvtz.Rule("exampleruleResourceResourceFromPvtzrule",
endpoint_id="string",
forward_ips=[{
"ip": "string",
"port": 0,
}],
rule_name="string",
zone_name="string",
type="string")
const exampleruleResourceResourceFromPvtzrule = new alicloud.pvtz.Rule("exampleruleResourceResourceFromPvtzrule", {
endpointId: "string",
forwardIps: [{
ip: "string",
port: 0,
}],
ruleName: "string",
zoneName: "string",
type: "string",
});
type: alicloud:pvtz:Rule
properties:
endpointId: string
forwardIps:
- ip: string
port: 0
ruleName: string
type: string
zoneName: string
Rule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Rule resource accepts the following input properties:
- Endpoint
Id string - The ID of the Endpoint.
- Forward
Ips List<Pulumi.Ali Cloud. Pvtz. Inputs. Rule Forward Ip> - Forwarding target. See
forward_ips
below. - Rule
Name string - The name of the resource.
- Zone
Name string - The name of the forwarding zone.
- Type string
- The type of the rule. Valid values:
OUTBOUND
.
- Endpoint
Id string - The ID of the Endpoint.
- Forward
Ips []RuleForward Ip Args - Forwarding target. See
forward_ips
below. - Rule
Name string - The name of the resource.
- Zone
Name string - The name of the forwarding zone.
- Type string
- The type of the rule. Valid values:
OUTBOUND
.
- endpoint
Id String - The ID of the Endpoint.
- forward
Ips List<RuleForward Ip> - Forwarding target. See
forward_ips
below. - rule
Name String - The name of the resource.
- zone
Name String - The name of the forwarding zone.
- type String
- The type of the rule. Valid values:
OUTBOUND
.
- endpoint
Id string - The ID of the Endpoint.
- forward
Ips RuleForward Ip[] - Forwarding target. See
forward_ips
below. - rule
Name string - The name of the resource.
- zone
Name string - The name of the forwarding zone.
- type string
- The type of the rule. Valid values:
OUTBOUND
.
- endpoint_
id str - The ID of the Endpoint.
- forward_
ips Sequence[RuleForward Ip Args] - Forwarding target. See
forward_ips
below. - rule_
name str - The name of the resource.
- zone_
name str - The name of the forwarding zone.
- type str
- The type of the rule. Valid values:
OUTBOUND
.
- endpoint
Id String - The ID of the Endpoint.
- forward
Ips List<Property Map> - Forwarding target. See
forward_ips
below. - rule
Name String - The name of the resource.
- zone
Name String - The name of the forwarding zone.
- type String
- The type of the rule. Valid values:
OUTBOUND
.
Outputs
All input properties are implicitly available as output properties. Additionally, the Rule resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Rule Resource
Get an existing Rule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: RuleState, opts?: CustomResourceOptions): Rule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
endpoint_id: Optional[str] = None,
forward_ips: Optional[Sequence[RuleForwardIpArgs]] = None,
rule_name: Optional[str] = None,
type: Optional[str] = None,
zone_name: Optional[str] = None) -> Rule
func GetRule(ctx *Context, name string, id IDInput, state *RuleState, opts ...ResourceOption) (*Rule, error)
public static Rule Get(string name, Input<string> id, RuleState? state, CustomResourceOptions? opts = null)
public static Rule get(String name, Output<String> id, RuleState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Endpoint
Id string - The ID of the Endpoint.
- Forward
Ips List<Pulumi.Ali Cloud. Pvtz. Inputs. Rule Forward Ip> - Forwarding target. See
forward_ips
below. - Rule
Name string - The name of the resource.
- Type string
- The type of the rule. Valid values:
OUTBOUND
. - Zone
Name string - The name of the forwarding zone.
- Endpoint
Id string - The ID of the Endpoint.
- Forward
Ips []RuleForward Ip Args - Forwarding target. See
forward_ips
below. - Rule
Name string - The name of the resource.
- Type string
- The type of the rule. Valid values:
OUTBOUND
. - Zone
Name string - The name of the forwarding zone.
- endpoint
Id String - The ID of the Endpoint.
- forward
Ips List<RuleForward Ip> - Forwarding target. See
forward_ips
below. - rule
Name String - The name of the resource.
- type String
- The type of the rule. Valid values:
OUTBOUND
. - zone
Name String - The name of the forwarding zone.
- endpoint
Id string - The ID of the Endpoint.
- forward
Ips RuleForward Ip[] - Forwarding target. See
forward_ips
below. - rule
Name string - The name of the resource.
- type string
- The type of the rule. Valid values:
OUTBOUND
. - zone
Name string - The name of the forwarding zone.
- endpoint_
id str - The ID of the Endpoint.
- forward_
ips Sequence[RuleForward Ip Args] - Forwarding target. See
forward_ips
below. - rule_
name str - The name of the resource.
- type str
- The type of the rule. Valid values:
OUTBOUND
. - zone_
name str - The name of the forwarding zone.
- endpoint
Id String - The ID of the Endpoint.
- forward
Ips List<Property Map> - Forwarding target. See
forward_ips
below. - rule
Name String - The name of the resource.
- type String
- The type of the rule. Valid values:
OUTBOUND
. - zone
Name String - The name of the forwarding zone.
Supporting Types
RuleForwardIp, RuleForwardIpArgs
Import
Private Zone Rule can be imported using the id, e.g.
$ pulumi import alicloud:pvtz/rule:Rule example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.