1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. pvtz
  5. Rule
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.pvtz.Rule

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    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)
    public Rule(String name, RuleArgs args)
    public Rule(String name, RuleArgs args, CustomResourceOptions options)
    
    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:

    EndpointId string
    The ID of the Endpoint.
    ForwardIps List<Pulumi.AliCloud.Pvtz.Inputs.RuleForwardIp>
    Forwarding target. See forward_ips below.
    RuleName string
    The name of the resource.
    ZoneName string
    The name of the forwarding zone.
    Type string
    The type of the rule. Valid values: OUTBOUND.
    EndpointId string
    The ID of the Endpoint.
    ForwardIps []RuleForwardIpArgs
    Forwarding target. See forward_ips below.
    RuleName string
    The name of the resource.
    ZoneName string
    The name of the forwarding zone.
    Type string
    The type of the rule. Valid values: OUTBOUND.
    endpointId String
    The ID of the Endpoint.
    forwardIps List<RuleForwardIp>
    Forwarding target. See forward_ips below.
    ruleName String
    The name of the resource.
    zoneName String
    The name of the forwarding zone.
    type String
    The type of the rule. Valid values: OUTBOUND.
    endpointId string
    The ID of the Endpoint.
    forwardIps RuleForwardIp[]
    Forwarding target. See forward_ips below.
    ruleName string
    The name of the resource.
    zoneName 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[RuleForwardIpArgs]
    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.
    endpointId String
    The ID of the Endpoint.
    forwardIps List<Property Map>
    Forwarding target. See forward_ips below.
    ruleName String
    The name of the resource.
    zoneName 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.
    The following state arguments are supported:
    EndpointId string
    The ID of the Endpoint.
    ForwardIps List<Pulumi.AliCloud.Pvtz.Inputs.RuleForwardIp>
    Forwarding target. See forward_ips below.
    RuleName string
    The name of the resource.
    Type string
    The type of the rule. Valid values: OUTBOUND.
    ZoneName string
    The name of the forwarding zone.
    EndpointId string
    The ID of the Endpoint.
    ForwardIps []RuleForwardIpArgs
    Forwarding target. See forward_ips below.
    RuleName string
    The name of the resource.
    Type string
    The type of the rule. Valid values: OUTBOUND.
    ZoneName string
    The name of the forwarding zone.
    endpointId String
    The ID of the Endpoint.
    forwardIps List<RuleForwardIp>
    Forwarding target. See forward_ips below.
    ruleName String
    The name of the resource.
    type String
    The type of the rule. Valid values: OUTBOUND.
    zoneName String
    The name of the forwarding zone.
    endpointId string
    The ID of the Endpoint.
    forwardIps RuleForwardIp[]
    Forwarding target. See forward_ips below.
    ruleName string
    The name of the resource.
    type string
    The type of the rule. Valid values: OUTBOUND.
    zoneName string
    The name of the forwarding zone.
    endpoint_id str
    The ID of the Endpoint.
    forward_ips Sequence[RuleForwardIpArgs]
    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.
    endpointId String
    The ID of the Endpoint.
    forwardIps List<Property Map>
    Forwarding target. See forward_ips below.
    ruleName String
    The name of the resource.
    type String
    The type of the rule. Valid values: OUTBOUND.
    zoneName String
    The name of the forwarding zone.

    Supporting Types

    RuleForwardIp, RuleForwardIpArgs

    Ip string
    The ip of the forwarding destination.
    Port int
    The port of the forwarding destination.
    Ip string
    The ip of the forwarding destination.
    Port int
    The port of the forwarding destination.
    ip String
    The ip of the forwarding destination.
    port Integer
    The port of the forwarding destination.
    ip string
    The ip of the forwarding destination.
    port number
    The port of the forwarding destination.
    ip str
    The ip of the forwarding destination.
    port int
    The port of the forwarding destination.
    ip String
    The ip of the forwarding destination.
    port Number
    The port of the forwarding destination.

    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.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi