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

alicloud.slb.AclEntryAttachment

Explore with Pulumi AI

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

    NOTE: Available in v1.162.0+.

    NOTE: The maximum number of entries per acl is 300.

    For information about acl entry attachment and how to use it, see Configure an acl entry.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const attachment = new alicloud.slb.Acl("attachment", {
        name: "forSlbAclEntryAttachment",
        ipVersion: "ipv4",
    });
    const attachmentAclEntryAttachment = new alicloud.slb.AclEntryAttachment("attachment", {
        aclId: attachment.id,
        entry: "168.10.10.0/24",
        comment: "second",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    attachment = alicloud.slb.Acl("attachment",
        name="forSlbAclEntryAttachment",
        ip_version="ipv4")
    attachment_acl_entry_attachment = alicloud.slb.AclEntryAttachment("attachment",
        acl_id=attachment.id,
        entry="168.10.10.0/24",
        comment="second")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/slb"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		attachment, err := slb.NewAcl(ctx, "attachment", &slb.AclArgs{
    			Name:      pulumi.String("forSlbAclEntryAttachment"),
    			IpVersion: pulumi.String("ipv4"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = slb.NewAclEntryAttachment(ctx, "attachment", &slb.AclEntryAttachmentArgs{
    			AclId:   attachment.ID(),
    			Entry:   pulumi.String("168.10.10.0/24"),
    			Comment: pulumi.String("second"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var attachment = new AliCloud.Slb.Acl("attachment", new()
        {
            Name = "forSlbAclEntryAttachment",
            IpVersion = "ipv4",
        });
    
        var attachmentAclEntryAttachment = new AliCloud.Slb.AclEntryAttachment("attachment", new()
        {
            AclId = attachment.Id,
            Entry = "168.10.10.0/24",
            Comment = "second",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.slb.Acl;
    import com.pulumi.alicloud.slb.AclArgs;
    import com.pulumi.alicloud.slb.AclEntryAttachment;
    import com.pulumi.alicloud.slb.AclEntryAttachmentArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var attachment = new Acl("attachment", AclArgs.builder()
                .name("forSlbAclEntryAttachment")
                .ipVersion("ipv4")
                .build());
    
            var attachmentAclEntryAttachment = new AclEntryAttachment("attachmentAclEntryAttachment", AclEntryAttachmentArgs.builder()
                .aclId(attachment.id())
                .entry("168.10.10.0/24")
                .comment("second")
                .build());
    
        }
    }
    
    resources:
      attachment:
        type: alicloud:slb:Acl
        properties:
          name: forSlbAclEntryAttachment
          ipVersion: ipv4
      attachmentAclEntryAttachment:
        type: alicloud:slb:AclEntryAttachment
        name: attachment
        properties:
          aclId: ${attachment.id}
          entry: 168.10.10.0/24
          comment: second
    

    Create AclEntryAttachment Resource

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

    Constructor syntax

    new AclEntryAttachment(name: string, args: AclEntryAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def AclEntryAttachment(resource_name: str,
                           args: AclEntryAttachmentArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def AclEntryAttachment(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           acl_id: Optional[str] = None,
                           entry: Optional[str] = None,
                           comment: Optional[str] = None)
    func NewAclEntryAttachment(ctx *Context, name string, args AclEntryAttachmentArgs, opts ...ResourceOption) (*AclEntryAttachment, error)
    public AclEntryAttachment(string name, AclEntryAttachmentArgs args, CustomResourceOptions? opts = null)
    public AclEntryAttachment(String name, AclEntryAttachmentArgs args)
    public AclEntryAttachment(String name, AclEntryAttachmentArgs args, CustomResourceOptions options)
    
    type: alicloud:slb:AclEntryAttachment
    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 AclEntryAttachmentArgs
    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 AclEntryAttachmentArgs
    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 AclEntryAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AclEntryAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AclEntryAttachmentArgs
    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 exampleaclEntryAttachmentResourceResourceFromSlbaclEntryAttachment = new AliCloud.Slb.AclEntryAttachment("exampleaclEntryAttachmentResourceResourceFromSlbaclEntryAttachment", new()
    {
        AclId = "string",
        Entry = "string",
        Comment = "string",
    });
    
    example, err := slb.NewAclEntryAttachment(ctx, "exampleaclEntryAttachmentResourceResourceFromSlbaclEntryAttachment", &slb.AclEntryAttachmentArgs{
    	AclId:   pulumi.String("string"),
    	Entry:   pulumi.String("string"),
    	Comment: pulumi.String("string"),
    })
    
    var exampleaclEntryAttachmentResourceResourceFromSlbaclEntryAttachment = new AclEntryAttachment("exampleaclEntryAttachmentResourceResourceFromSlbaclEntryAttachment", AclEntryAttachmentArgs.builder()
        .aclId("string")
        .entry("string")
        .comment("string")
        .build());
    
    exampleacl_entry_attachment_resource_resource_from_slbacl_entry_attachment = alicloud.slb.AclEntryAttachment("exampleaclEntryAttachmentResourceResourceFromSlbaclEntryAttachment",
        acl_id="string",
        entry="string",
        comment="string")
    
    const exampleaclEntryAttachmentResourceResourceFromSlbaclEntryAttachment = new alicloud.slb.AclEntryAttachment("exampleaclEntryAttachmentResourceResourceFromSlbaclEntryAttachment", {
        aclId: "string",
        entry: "string",
        comment: "string",
    });
    
    type: alicloud:slb:AclEntryAttachment
    properties:
        aclId: string
        comment: string
        entry: string
    

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

    AclId string
    The ID of the Acl.
    Entry string
    The CIDR blocks.
    Comment string
    The comment of the entry.
    AclId string
    The ID of the Acl.
    Entry string
    The CIDR blocks.
    Comment string
    The comment of the entry.
    aclId String
    The ID of the Acl.
    entry String
    The CIDR blocks.
    comment String
    The comment of the entry.
    aclId string
    The ID of the Acl.
    entry string
    The CIDR blocks.
    comment string
    The comment of the entry.
    acl_id str
    The ID of the Acl.
    entry str
    The CIDR blocks.
    comment str
    The comment of the entry.
    aclId String
    The ID of the Acl.
    entry String
    The CIDR blocks.
    comment String
    The comment of the entry.

    Outputs

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

    Get an existing AclEntryAttachment 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?: AclEntryAttachmentState, opts?: CustomResourceOptions): AclEntryAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            acl_id: Optional[str] = None,
            comment: Optional[str] = None,
            entry: Optional[str] = None) -> AclEntryAttachment
    func GetAclEntryAttachment(ctx *Context, name string, id IDInput, state *AclEntryAttachmentState, opts ...ResourceOption) (*AclEntryAttachment, error)
    public static AclEntryAttachment Get(string name, Input<string> id, AclEntryAttachmentState? state, CustomResourceOptions? opts = null)
    public static AclEntryAttachment get(String name, Output<String> id, AclEntryAttachmentState 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:
    AclId string
    The ID of the Acl.
    Comment string
    The comment of the entry.
    Entry string
    The CIDR blocks.
    AclId string
    The ID of the Acl.
    Comment string
    The comment of the entry.
    Entry string
    The CIDR blocks.
    aclId String
    The ID of the Acl.
    comment String
    The comment of the entry.
    entry String
    The CIDR blocks.
    aclId string
    The ID of the Acl.
    comment string
    The comment of the entry.
    entry string
    The CIDR blocks.
    acl_id str
    The ID of the Acl.
    comment str
    The comment of the entry.
    entry str
    The CIDR blocks.
    aclId String
    The ID of the Acl.
    comment String
    The comment of the entry.
    entry String
    The CIDR blocks.

    Import

    Acl entry attachment can be imported using the id, e.g.

    $ pulumi import alicloud:slb/aclEntryAttachment:AclEntryAttachment example <acl_id>:<entry>
    

    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