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

alicloud.apigateway.AccessControlList

Explore with Pulumi AI

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

    Provides a Api Gateway Access Control List resource. Access control list.

    For information about Api Gateway Access Control List and how to use it, see What is Access Control List.

    NOTE: Available since v1.224.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform_example";
    const defaultxywS8c = new alicloud.apigateway.Instance("defaultxywS8c", {
        instanceName: name,
        instanceSpec: "api.s1.small",
        httpsPolicy: "HTTPS2_TLS1_0",
        zoneId: "cn-hangzhou-MAZ6",
        paymentType: "PayAsYouGo",
    });
    const _default = new alicloud.apigateway.AccessControlList("default", {
        accessControlListName: name,
        addressIpVersion: "ipv4",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform_example"
    defaultxyw_s8c = alicloud.apigateway.Instance("defaultxywS8c",
        instance_name=name,
        instance_spec="api.s1.small",
        https_policy="HTTPS2_TLS1_0",
        zone_id="cn-hangzhou-MAZ6",
        payment_type="PayAsYouGo")
    default = alicloud.apigateway.AccessControlList("default",
        access_control_list_name=name,
        address_ip_version="ipv4")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/apigateway"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform_example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_, err := apigateway.NewInstance(ctx, "defaultxywS8c", &apigateway.InstanceArgs{
    			InstanceName: pulumi.String(name),
    			InstanceSpec: pulumi.String("api.s1.small"),
    			HttpsPolicy:  pulumi.String("HTTPS2_TLS1_0"),
    			ZoneId:       pulumi.String("cn-hangzhou-MAZ6"),
    			PaymentType:  pulumi.String("PayAsYouGo"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = apigateway.NewAccessControlList(ctx, "default", &apigateway.AccessControlListArgs{
    			AccessControlListName: pulumi.String(name),
    			AddressIpVersion:      pulumi.String("ipv4"),
    		})
    		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 config = new Config();
        var name = config.Get("name") ?? "terraform_example";
        var defaultxywS8c = new AliCloud.ApiGateway.Instance("defaultxywS8c", new()
        {
            InstanceName = name,
            InstanceSpec = "api.s1.small",
            HttpsPolicy = "HTTPS2_TLS1_0",
            ZoneId = "cn-hangzhou-MAZ6",
            PaymentType = "PayAsYouGo",
        });
    
        var @default = new AliCloud.ApiGateway.AccessControlList("default", new()
        {
            AccessControlListName = name,
            AddressIpVersion = "ipv4",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.apigateway.Instance;
    import com.pulumi.alicloud.apigateway.InstanceArgs;
    import com.pulumi.alicloud.apigateway.AccessControlList;
    import com.pulumi.alicloud.apigateway.AccessControlListArgs;
    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) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("terraform_example");
            var defaultxywS8c = new Instance("defaultxywS8c", InstanceArgs.builder()
                .instanceName(name)
                .instanceSpec("api.s1.small")
                .httpsPolicy("HTTPS2_TLS1_0")
                .zoneId("cn-hangzhou-MAZ6")
                .paymentType("PayAsYouGo")
                .build());
    
            var default_ = new AccessControlList("default", AccessControlListArgs.builder()
                .accessControlListName(name)
                .addressIpVersion("ipv4")
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform_example
    resources:
      defaultxywS8c:
        type: alicloud:apigateway:Instance
        properties:
          instanceName: ${name}
          instanceSpec: api.s1.small
          httpsPolicy: HTTPS2_TLS1_0
          zoneId: cn-hangzhou-MAZ6
          paymentType: PayAsYouGo
      default:
        type: alicloud:apigateway:AccessControlList
        properties:
          accessControlListName: ${name}
          addressIpVersion: ipv4
    

    Create AccessControlList Resource

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

    Constructor syntax

    new AccessControlList(name: string, args: AccessControlListArgs, opts?: CustomResourceOptions);
    @overload
    def AccessControlList(resource_name: str,
                          args: AccessControlListArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def AccessControlList(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          access_control_list_name: Optional[str] = None,
                          acl_entrys: Optional[Sequence[AccessControlListAclEntryArgs]] = None,
                          address_ip_version: Optional[str] = None)
    func NewAccessControlList(ctx *Context, name string, args AccessControlListArgs, opts ...ResourceOption) (*AccessControlList, error)
    public AccessControlList(string name, AccessControlListArgs args, CustomResourceOptions? opts = null)
    public AccessControlList(String name, AccessControlListArgs args)
    public AccessControlList(String name, AccessControlListArgs args, CustomResourceOptions options)
    
    type: alicloud:apigateway:AccessControlList
    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 AccessControlListArgs
    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 AccessControlListArgs
    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 AccessControlListArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AccessControlListArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AccessControlListArgs
    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 accessControlListResource = new AliCloud.ApiGateway.AccessControlList("accessControlListResource", new()
    {
        AccessControlListName = "string",
        AddressIpVersion = "string",
    });
    
    example, err := apigateway.NewAccessControlList(ctx, "accessControlListResource", &apigateway.AccessControlListArgs{
    	AccessControlListName: pulumi.String("string"),
    	AddressIpVersion:      pulumi.String("string"),
    })
    
    var accessControlListResource = new AccessControlList("accessControlListResource", AccessControlListArgs.builder()
        .accessControlListName("string")
        .addressIpVersion("string")
        .build());
    
    access_control_list_resource = alicloud.apigateway.AccessControlList("accessControlListResource",
        access_control_list_name="string",
        address_ip_version="string")
    
    const accessControlListResource = new alicloud.apigateway.AccessControlList("accessControlListResource", {
        accessControlListName: "string",
        addressIpVersion: "string",
    });
    
    type: alicloud:apigateway:AccessControlList
    properties:
        accessControlListName: string
        addressIpVersion: string
    

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

    AccessControlListName string
    Access control list name.
    AclEntrys List<Pulumi.AliCloud.ApiGateway.Inputs.AccessControlListAclEntry>
    Information list of access control policies. You can add at most 50 IP addresses or CIDR blocks to an ACL in each call. If the IP address or CIDR block that you want to add to an ACL already exists, the IP address or CIDR block is not added. The entries that you add must be CIDR blocks. See acl_entrys below. NOTE: Field 'acl_entrys' has been deprecated from provider version 1.228.0, and it will be removed in the future version. Please use the new resource 'alicloud_api_gateway_acl_entry_attachment'.

    Deprecated: Field 'acl_entrys' has been deprecated from provider version v1.228.0, and it will be removed in the future version. Please use the new resource 'alicloud_api_gateway_acl_entry_attachment'.

    AddressIpVersion string
    The IP version. Valid values: ipv4 and ipv6.
    AccessControlListName string
    Access control list name.
    AclEntrys []AccessControlListAclEntryArgs
    Information list of access control policies. You can add at most 50 IP addresses or CIDR blocks to an ACL in each call. If the IP address or CIDR block that you want to add to an ACL already exists, the IP address or CIDR block is not added. The entries that you add must be CIDR blocks. See acl_entrys below. NOTE: Field 'acl_entrys' has been deprecated from provider version 1.228.0, and it will be removed in the future version. Please use the new resource 'alicloud_api_gateway_acl_entry_attachment'.

    Deprecated: Field 'acl_entrys' has been deprecated from provider version v1.228.0, and it will be removed in the future version. Please use the new resource 'alicloud_api_gateway_acl_entry_attachment'.

    AddressIpVersion string
    The IP version. Valid values: ipv4 and ipv6.
    accessControlListName String
    Access control list name.
    aclEntrys List<AccessControlListAclEntry>
    Information list of access control policies. You can add at most 50 IP addresses or CIDR blocks to an ACL in each call. If the IP address or CIDR block that you want to add to an ACL already exists, the IP address or CIDR block is not added. The entries that you add must be CIDR blocks. See acl_entrys below. NOTE: Field 'acl_entrys' has been deprecated from provider version 1.228.0, and it will be removed in the future version. Please use the new resource 'alicloud_api_gateway_acl_entry_attachment'.

    Deprecated: Field 'acl_entrys' has been deprecated from provider version v1.228.0, and it will be removed in the future version. Please use the new resource 'alicloud_api_gateway_acl_entry_attachment'.

    addressIpVersion String
    The IP version. Valid values: ipv4 and ipv6.
    accessControlListName string
    Access control list name.
    aclEntrys AccessControlListAclEntry[]
    Information list of access control policies. You can add at most 50 IP addresses or CIDR blocks to an ACL in each call. If the IP address or CIDR block that you want to add to an ACL already exists, the IP address or CIDR block is not added. The entries that you add must be CIDR blocks. See acl_entrys below. NOTE: Field 'acl_entrys' has been deprecated from provider version 1.228.0, and it will be removed in the future version. Please use the new resource 'alicloud_api_gateway_acl_entry_attachment'.

    Deprecated: Field 'acl_entrys' has been deprecated from provider version v1.228.0, and it will be removed in the future version. Please use the new resource 'alicloud_api_gateway_acl_entry_attachment'.

    addressIpVersion string
    The IP version. Valid values: ipv4 and ipv6.
    access_control_list_name str
    Access control list name.
    acl_entrys Sequence[AccessControlListAclEntryArgs]
    Information list of access control policies. You can add at most 50 IP addresses or CIDR blocks to an ACL in each call. If the IP address or CIDR block that you want to add to an ACL already exists, the IP address or CIDR block is not added. The entries that you add must be CIDR blocks. See acl_entrys below. NOTE: Field 'acl_entrys' has been deprecated from provider version 1.228.0, and it will be removed in the future version. Please use the new resource 'alicloud_api_gateway_acl_entry_attachment'.

    Deprecated: Field 'acl_entrys' has been deprecated from provider version v1.228.0, and it will be removed in the future version. Please use the new resource 'alicloud_api_gateway_acl_entry_attachment'.

    address_ip_version str
    The IP version. Valid values: ipv4 and ipv6.
    accessControlListName String
    Access control list name.
    aclEntrys List<Property Map>
    Information list of access control policies. You can add at most 50 IP addresses or CIDR blocks to an ACL in each call. If the IP address or CIDR block that you want to add to an ACL already exists, the IP address or CIDR block is not added. The entries that you add must be CIDR blocks. See acl_entrys below. NOTE: Field 'acl_entrys' has been deprecated from provider version 1.228.0, and it will be removed in the future version. Please use the new resource 'alicloud_api_gateway_acl_entry_attachment'.

    Deprecated: Field 'acl_entrys' has been deprecated from provider version v1.228.0, and it will be removed in the future version. Please use the new resource 'alicloud_api_gateway_acl_entry_attachment'.

    addressIpVersion String
    The IP version. Valid values: ipv4 and ipv6.

    Outputs

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

    Get an existing AccessControlList 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?: AccessControlListState, opts?: CustomResourceOptions): AccessControlList
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_control_list_name: Optional[str] = None,
            acl_entrys: Optional[Sequence[AccessControlListAclEntryArgs]] = None,
            address_ip_version: Optional[str] = None) -> AccessControlList
    func GetAccessControlList(ctx *Context, name string, id IDInput, state *AccessControlListState, opts ...ResourceOption) (*AccessControlList, error)
    public static AccessControlList Get(string name, Input<string> id, AccessControlListState? state, CustomResourceOptions? opts = null)
    public static AccessControlList get(String name, Output<String> id, AccessControlListState 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:
    AccessControlListName string
    Access control list name.
    AclEntrys List<Pulumi.AliCloud.ApiGateway.Inputs.AccessControlListAclEntry>
    Information list of access control policies. You can add at most 50 IP addresses or CIDR blocks to an ACL in each call. If the IP address or CIDR block that you want to add to an ACL already exists, the IP address or CIDR block is not added. The entries that you add must be CIDR blocks. See acl_entrys below. NOTE: Field 'acl_entrys' has been deprecated from provider version 1.228.0, and it will be removed in the future version. Please use the new resource 'alicloud_api_gateway_acl_entry_attachment'.

    Deprecated: Field 'acl_entrys' has been deprecated from provider version v1.228.0, and it will be removed in the future version. Please use the new resource 'alicloud_api_gateway_acl_entry_attachment'.

    AddressIpVersion string
    The IP version. Valid values: ipv4 and ipv6.
    AccessControlListName string
    Access control list name.
    AclEntrys []AccessControlListAclEntryArgs
    Information list of access control policies. You can add at most 50 IP addresses or CIDR blocks to an ACL in each call. If the IP address or CIDR block that you want to add to an ACL already exists, the IP address or CIDR block is not added. The entries that you add must be CIDR blocks. See acl_entrys below. NOTE: Field 'acl_entrys' has been deprecated from provider version 1.228.0, and it will be removed in the future version. Please use the new resource 'alicloud_api_gateway_acl_entry_attachment'.

    Deprecated: Field 'acl_entrys' has been deprecated from provider version v1.228.0, and it will be removed in the future version. Please use the new resource 'alicloud_api_gateway_acl_entry_attachment'.

    AddressIpVersion string
    The IP version. Valid values: ipv4 and ipv6.
    accessControlListName String
    Access control list name.
    aclEntrys List<AccessControlListAclEntry>
    Information list of access control policies. You can add at most 50 IP addresses or CIDR blocks to an ACL in each call. If the IP address or CIDR block that you want to add to an ACL already exists, the IP address or CIDR block is not added. The entries that you add must be CIDR blocks. See acl_entrys below. NOTE: Field 'acl_entrys' has been deprecated from provider version 1.228.0, and it will be removed in the future version. Please use the new resource 'alicloud_api_gateway_acl_entry_attachment'.

    Deprecated: Field 'acl_entrys' has been deprecated from provider version v1.228.0, and it will be removed in the future version. Please use the new resource 'alicloud_api_gateway_acl_entry_attachment'.

    addressIpVersion String
    The IP version. Valid values: ipv4 and ipv6.
    accessControlListName string
    Access control list name.
    aclEntrys AccessControlListAclEntry[]
    Information list of access control policies. You can add at most 50 IP addresses or CIDR blocks to an ACL in each call. If the IP address or CIDR block that you want to add to an ACL already exists, the IP address or CIDR block is not added. The entries that you add must be CIDR blocks. See acl_entrys below. NOTE: Field 'acl_entrys' has been deprecated from provider version 1.228.0, and it will be removed in the future version. Please use the new resource 'alicloud_api_gateway_acl_entry_attachment'.

    Deprecated: Field 'acl_entrys' has been deprecated from provider version v1.228.0, and it will be removed in the future version. Please use the new resource 'alicloud_api_gateway_acl_entry_attachment'.

    addressIpVersion string
    The IP version. Valid values: ipv4 and ipv6.
    access_control_list_name str
    Access control list name.
    acl_entrys Sequence[AccessControlListAclEntryArgs]
    Information list of access control policies. You can add at most 50 IP addresses or CIDR blocks to an ACL in each call. If the IP address or CIDR block that you want to add to an ACL already exists, the IP address or CIDR block is not added. The entries that you add must be CIDR blocks. See acl_entrys below. NOTE: Field 'acl_entrys' has been deprecated from provider version 1.228.0, and it will be removed in the future version. Please use the new resource 'alicloud_api_gateway_acl_entry_attachment'.

    Deprecated: Field 'acl_entrys' has been deprecated from provider version v1.228.0, and it will be removed in the future version. Please use the new resource 'alicloud_api_gateway_acl_entry_attachment'.

    address_ip_version str
    The IP version. Valid values: ipv4 and ipv6.
    accessControlListName String
    Access control list name.
    aclEntrys List<Property Map>
    Information list of access control policies. You can add at most 50 IP addresses or CIDR blocks to an ACL in each call. If the IP address or CIDR block that you want to add to an ACL already exists, the IP address or CIDR block is not added. The entries that you add must be CIDR blocks. See acl_entrys below. NOTE: Field 'acl_entrys' has been deprecated from provider version 1.228.0, and it will be removed in the future version. Please use the new resource 'alicloud_api_gateway_acl_entry_attachment'.

    Deprecated: Field 'acl_entrys' has been deprecated from provider version v1.228.0, and it will be removed in the future version. Please use the new resource 'alicloud_api_gateway_acl_entry_attachment'.

    addressIpVersion String
    The IP version. Valid values: ipv4 and ipv6.

    Supporting Types

    AccessControlListAclEntry, AccessControlListAclEntryArgs

    AclEntryComment string
    The description of the ACL.
    AclEntryIp string
    The entries that you want to add to the ACL. You can add CIDR blocks. Separate multiple CIDR blocks with commas (,).
    AclEntryComment string
    The description of the ACL.
    AclEntryIp string
    The entries that you want to add to the ACL. You can add CIDR blocks. Separate multiple CIDR blocks with commas (,).
    aclEntryComment String
    The description of the ACL.
    aclEntryIp String
    The entries that you want to add to the ACL. You can add CIDR blocks. Separate multiple CIDR blocks with commas (,).
    aclEntryComment string
    The description of the ACL.
    aclEntryIp string
    The entries that you want to add to the ACL. You can add CIDR blocks. Separate multiple CIDR blocks with commas (,).
    acl_entry_comment str
    The description of the ACL.
    acl_entry_ip str
    The entries that you want to add to the ACL. You can add CIDR blocks. Separate multiple CIDR blocks with commas (,).
    aclEntryComment String
    The description of the ACL.
    aclEntryIp String
    The entries that you want to add to the ACL. You can add CIDR blocks. Separate multiple CIDR blocks with commas (,).

    Import

    Api Gateway Access Control List can be imported using the id, e.g.

    $ pulumi import alicloud:apigateway/accessControlList:AccessControlList 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