alicloud.pvtz.RuleAttachment
Explore with Pulumi AI
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:
- Rule
Id string - The ID of the rule.
- Vpcs
List<Pulumi.
Ali Cloud. Pvtz. Inputs. Rule Attachment Vpc> - The List of the VPC. See
vpcs
below.
- Rule
Id string - The ID of the rule.
- Vpcs
[]Rule
Attachment Vpc Args - The List of the VPC. See
vpcs
below.
- rule
Id String - The ID of the rule.
- vpcs
List<Rule
Attachment Vpc> - The List of the VPC. See
vpcs
below.
- rule
Id string - The ID of the rule.
- vpcs
Rule
Attachment Vpc[] - The List of the VPC. See
vpcs
below.
- rule_
id str - The ID of the rule.
- vpcs
Sequence[Rule
Attachment Vpc Args] - The List of the VPC. See
vpcs
below.
- rule
Id 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.
- Rule
Id string - The ID of the rule.
- Vpcs
List<Pulumi.
Ali Cloud. Pvtz. Inputs. Rule Attachment Vpc> - The List of the VPC. See
vpcs
below.
- Rule
Id string - The ID of the rule.
- Vpcs
[]Rule
Attachment Vpc Args - The List of the VPC. See
vpcs
below.
- rule
Id String - The ID of the rule.
- vpcs
List<Rule
Attachment Vpc> - The List of the VPC. See
vpcs
below.
- rule
Id string - The ID of the rule.
- vpcs
Rule
Attachment Vpc[] - The List of the VPC. See
vpcs
below.
- rule_
id str - The ID of the rule.
- vpcs
Sequence[Rule
Attachment Vpc Args] - The List of the VPC. See
vpcs
below.
- rule
Id String - The ID of the rule.
- vpcs List<Property Map>
- The List of the VPC. See
vpcs
below.
Supporting Types
RuleAttachmentVpc, RuleAttachmentVpcArgs
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.