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

alicloud.pvtz.RuleAttachment

Explore with Pulumi AI

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

    Provides a Private Zone Rule Attachment resource.

    For information about Private Zone Rule Attachment and how to use it, see What is Rule Attachment.

    NOTE: Available since v1.143.0.

    Create RuleAttachment Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new RuleAttachment(name: string, args: RuleAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def RuleAttachment(resource_name: str,
                       args: RuleAttachmentArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def RuleAttachment(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       rule_id: Optional[str] = None,
                       vpcs: Optional[Sequence[RuleAttachmentVpcArgs]] = None)
    func NewRuleAttachment(ctx *Context, name string, args RuleAttachmentArgs, opts ...ResourceOption) (*RuleAttachment, error)
    public RuleAttachment(string name, RuleAttachmentArgs args, CustomResourceOptions? opts = null)
    public RuleAttachment(String name, RuleAttachmentArgs args)
    public RuleAttachment(String name, RuleAttachmentArgs args, CustomResourceOptions options)
    
    type: alicloud:pvtz:RuleAttachment
    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 RuleAttachmentArgs
    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 RuleAttachmentArgs
    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 RuleAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RuleAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RuleAttachmentArgs
    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 ruleAttachmentResource = new AliCloud.Pvtz.RuleAttachment("ruleAttachmentResource", new()
    {
        RuleId = "string",
        Vpcs = new[]
        {
            new AliCloud.Pvtz.Inputs.RuleAttachmentVpcArgs
            {
                RegionId = "string",
                VpcId = "string",
            },
        },
    });
    
    example, err := pvtz.NewRuleAttachment(ctx, "ruleAttachmentResource", &pvtz.RuleAttachmentArgs{
    	RuleId: pulumi.String("string"),
    	Vpcs: pvtz.RuleAttachmentVpcArray{
    		&pvtz.RuleAttachmentVpcArgs{
    			RegionId: pulumi.String("string"),
    			VpcId:    pulumi.String("string"),
    		},
    	},
    })
    
    var ruleAttachmentResource = new RuleAttachment("ruleAttachmentResource", RuleAttachmentArgs.builder()
        .ruleId("string")
        .vpcs(RuleAttachmentVpcArgs.builder()
            .regionId("string")
            .vpcId("string")
            .build())
        .build());
    
    rule_attachment_resource = alicloud.pvtz.RuleAttachment("ruleAttachmentResource",
        rule_id="string",
        vpcs=[{
            "region_id": "string",
            "vpc_id": "string",
        }])
    
    const ruleAttachmentResource = new alicloud.pvtz.RuleAttachment("ruleAttachmentResource", {
        ruleId: "string",
        vpcs: [{
            regionId: "string",
            vpcId: "string",
        }],
    });
    
    type: alicloud:pvtz:RuleAttachment
    properties:
        ruleId: string
        vpcs:
            - regionId: string
              vpcId: string
    

    RuleAttachment 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 RuleAttachment resource accepts the following input properties:

    RuleId string
    The ID of the rule.
    Vpcs List<Pulumi.AliCloud.Pvtz.Inputs.RuleAttachmentVpc>
    The List of the VPC. See vpcs below.
    RuleId string
    The ID of the rule.
    Vpcs []RuleAttachmentVpcArgs
    The List of the VPC. See vpcs below.
    ruleId String
    The ID of the rule.
    vpcs List<RuleAttachmentVpc>
    The List of the VPC. See vpcs below.
    ruleId string
    The ID of the rule.
    vpcs RuleAttachmentVpc[]
    The List of the VPC. See vpcs below.
    rule_id str
    The ID of the rule.
    vpcs Sequence[RuleAttachmentVpcArgs]
    The List of the VPC. See vpcs below.
    ruleId String
    The ID of the rule.
    vpcs List<Property Map>
    The List of the VPC. See vpcs below.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RuleAttachment 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 RuleAttachment Resource

    Get an existing RuleAttachment 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?: RuleAttachmentState, opts?: CustomResourceOptions): RuleAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            rule_id: Optional[str] = None,
            vpcs: Optional[Sequence[RuleAttachmentVpcArgs]] = None) -> RuleAttachment
    func GetRuleAttachment(ctx *Context, name string, id IDInput, state *RuleAttachmentState, opts ...ResourceOption) (*RuleAttachment, error)
    public static RuleAttachment Get(string name, Input<string> id, RuleAttachmentState? state, CustomResourceOptions? opts = null)
    public static RuleAttachment get(String name, Output<String> id, RuleAttachmentState 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:
    RuleId string
    The ID of the rule.
    Vpcs List<Pulumi.AliCloud.Pvtz.Inputs.RuleAttachmentVpc>
    The List of the VPC. See vpcs below.
    RuleId string
    The ID of the rule.
    Vpcs []RuleAttachmentVpcArgs
    The List of the VPC. See vpcs below.
    ruleId String
    The ID of the rule.
    vpcs List<RuleAttachmentVpc>
    The List of the VPC. See vpcs below.
    ruleId string
    The ID of the rule.
    vpcs RuleAttachmentVpc[]
    The List of the VPC. See vpcs below.
    rule_id str
    The ID of the rule.
    vpcs Sequence[RuleAttachmentVpcArgs]
    The List of the VPC. See vpcs below.
    ruleId String
    The ID of the rule.
    vpcs List<Property Map>
    The List of the VPC. See vpcs below.

    Supporting Types

    RuleAttachmentVpc, RuleAttachmentVpcArgs

    RegionId string
    The region of the vpc. If not set, the current region will instead of.
    VpcId string
    The ID of the VPC. NOTE: The VPC that can be associated with the forwarding rule must belong to the same region as the Endpoint.
    RegionId string
    The region of the vpc. If not set, the current region will instead of.
    VpcId string
    The ID of the VPC. NOTE: The VPC that can be associated with the forwarding rule must belong to the same region as the Endpoint.
    regionId String
    The region of the vpc. If not set, the current region will instead of.
    vpcId String
    The ID of the VPC. NOTE: The VPC that can be associated with the forwarding rule must belong to the same region as the Endpoint.
    regionId string
    The region of the vpc. If not set, the current region will instead of.
    vpcId string
    The ID of the VPC. NOTE: The VPC that can be associated with the forwarding rule must belong to the same region as the Endpoint.
    region_id str
    The region of the vpc. If not set, the current region will instead of.
    vpc_id str
    The ID of the VPC. NOTE: The VPC that can be associated with the forwarding rule must belong to the same region as the Endpoint.
    regionId String
    The region of the vpc. If not set, the current region will instead of.
    vpcId String
    The ID of the VPC. NOTE: The VPC that can be associated with the forwarding rule must belong to the same region as the Endpoint.

    Import

    Private Zone Rule Attachment can be imported using the id, e.g.

    $ pulumi import alicloud:pvtz/ruleAttachment:RuleAttachment example <rule_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