1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. ApigwAclPolicyAssociateV2
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

opentelekomcloud.ApigwAclPolicyAssociateV2

Explore with Pulumi AI

opentelekomcloud logo
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

    Up-to-date reference of API arguments for API Gateway Acl associate service you can get at documentation portal

    Use this resource to bind the APIs to the ACL policy within OpenTelekomCloud.

    An ACL policy can only create one opentelekomcloud.ApigwAclPolicyAssociateV2 resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const config = new pulumi.Config();
    const gatewayId = config.requireObject("gatewayId");
    const policyId = config.requireObject("policyId");
    const apiPublishIds = config.requireObject<Array<string>>("apiPublishIds");
    const test = new opentelekomcloud.ApigwAclPolicyAssociateV2("test", {
        gatewayId: gatewayId,
        policyId: policyId,
        publishIds: apiPublishIds,
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    config = pulumi.Config()
    gateway_id = config.require_object("gatewayId")
    policy_id = config.require_object("policyId")
    api_publish_ids = config.require_object("apiPublishIds")
    test = opentelekomcloud.ApigwAclPolicyAssociateV2("test",
        gateway_id=gateway_id,
        policy_id=policy_id,
        publish_ids=api_publish_ids)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"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, "")
    		gatewayId := cfg.RequireObject("gatewayId")
    		policyId := cfg.RequireObject("policyId")
    		apiPublishIds := cfg.Require("apiPublishIds")
    		_, err := opentelekomcloud.NewApigwAclPolicyAssociateV2(ctx, "test", &opentelekomcloud.ApigwAclPolicyAssociateV2Args{
    			GatewayId:  pulumi.Any(gatewayId),
    			PolicyId:   pulumi.Any(policyId),
    			PublishIds: apiPublishIds,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var gatewayId = config.RequireObject<dynamic>("gatewayId");
        var policyId = config.RequireObject<dynamic>("policyId");
        var apiPublishIds = config.RequireObject<string[]>("apiPublishIds");
        var test = new Opentelekomcloud.ApigwAclPolicyAssociateV2("test", new()
        {
            GatewayId = gatewayId,
            PolicyId = policyId,
            PublishIds = apiPublishIds,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.ApigwAclPolicyAssociateV2;
    import com.pulumi.opentelekomcloud.ApigwAclPolicyAssociateV2Args;
    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 gatewayId = config.get("gatewayId");
            final var policyId = config.get("policyId");
            final var apiPublishIds = config.get("apiPublishIds");
            var test = new ApigwAclPolicyAssociateV2("test", ApigwAclPolicyAssociateV2Args.builder()
                .gatewayId(gatewayId)
                .policyId(policyId)
                .publishIds(apiPublishIds)
                .build());
    
        }
    }
    
    configuration:
      gatewayId:
        type: dynamic
      policyId:
        type: dynamic
      apiPublishIds:
        type: list(string)
    resources:
      test:
        type: opentelekomcloud:ApigwAclPolicyAssociateV2
        properties:
          gatewayId: ${gatewayId}
          policyId: ${policyId}
          publishIds: ${apiPublishIds}
    

    Create ApigwAclPolicyAssociateV2 Resource

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

    Constructor syntax

    new ApigwAclPolicyAssociateV2(name: string, args: ApigwAclPolicyAssociateV2Args, opts?: CustomResourceOptions);
    @overload
    def ApigwAclPolicyAssociateV2(resource_name: str,
                                  args: ApigwAclPolicyAssociateV2Args,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApigwAclPolicyAssociateV2(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  gateway_id: Optional[str] = None,
                                  policy_id: Optional[str] = None,
                                  publish_ids: Optional[Sequence[str]] = None,
                                  apigw_acl_policy_associate_v2_id: Optional[str] = None)
    func NewApigwAclPolicyAssociateV2(ctx *Context, name string, args ApigwAclPolicyAssociateV2Args, opts ...ResourceOption) (*ApigwAclPolicyAssociateV2, error)
    public ApigwAclPolicyAssociateV2(string name, ApigwAclPolicyAssociateV2Args args, CustomResourceOptions? opts = null)
    public ApigwAclPolicyAssociateV2(String name, ApigwAclPolicyAssociateV2Args args)
    public ApigwAclPolicyAssociateV2(String name, ApigwAclPolicyAssociateV2Args args, CustomResourceOptions options)
    
    type: opentelekomcloud:ApigwAclPolicyAssociateV2
    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 ApigwAclPolicyAssociateV2Args
    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 ApigwAclPolicyAssociateV2Args
    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 ApigwAclPolicyAssociateV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApigwAclPolicyAssociateV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApigwAclPolicyAssociateV2Args
    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 apigwAclPolicyAssociateV2Resource = new Opentelekomcloud.ApigwAclPolicyAssociateV2("apigwAclPolicyAssociateV2Resource", new()
    {
        GatewayId = "string",
        PolicyId = "string",
        PublishIds = new[]
        {
            "string",
        },
        ApigwAclPolicyAssociateV2Id = "string",
    });
    
    example, err := opentelekomcloud.NewApigwAclPolicyAssociateV2(ctx, "apigwAclPolicyAssociateV2Resource", &opentelekomcloud.ApigwAclPolicyAssociateV2Args{
    	GatewayId: pulumi.String("string"),
    	PolicyId:  pulumi.String("string"),
    	PublishIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ApigwAclPolicyAssociateV2Id: pulumi.String("string"),
    })
    
    var apigwAclPolicyAssociateV2Resource = new ApigwAclPolicyAssociateV2("apigwAclPolicyAssociateV2Resource", ApigwAclPolicyAssociateV2Args.builder()
        .gatewayId("string")
        .policyId("string")
        .publishIds("string")
        .apigwAclPolicyAssociateV2Id("string")
        .build());
    
    apigw_acl_policy_associate_v2_resource = opentelekomcloud.ApigwAclPolicyAssociateV2("apigwAclPolicyAssociateV2Resource",
        gateway_id="string",
        policy_id="string",
        publish_ids=["string"],
        apigw_acl_policy_associate_v2_id="string")
    
    const apigwAclPolicyAssociateV2Resource = new opentelekomcloud.ApigwAclPolicyAssociateV2("apigwAclPolicyAssociateV2Resource", {
        gatewayId: "string",
        policyId: "string",
        publishIds: ["string"],
        apigwAclPolicyAssociateV2Id: "string",
    });
    
    type: opentelekomcloud:ApigwAclPolicyAssociateV2
    properties:
        apigwAclPolicyAssociateV2Id: string
        gatewayId: string
        policyId: string
        publishIds:
            - string
    

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

    GatewayId string
    Specifies the ID of the dedicated gateway instance to which the APIs and the ACL policy belong. Changing this will create a new resource.
    PolicyId string
    Specifies the ACL Policy ID for APIs binding. Changing this will create a new resource.
    PublishIds List<string>
    Specifies the publishing IDs corresponding to the APIs bound by the ACL policy.
    ApigwAclPolicyAssociateV2Id string
    Resource ID. The format is <gateway_id>/<policy_id>.
    GatewayId string
    Specifies the ID of the dedicated gateway instance to which the APIs and the ACL policy belong. Changing this will create a new resource.
    PolicyId string
    Specifies the ACL Policy ID for APIs binding. Changing this will create a new resource.
    PublishIds []string
    Specifies the publishing IDs corresponding to the APIs bound by the ACL policy.
    ApigwAclPolicyAssociateV2Id string
    Resource ID. The format is <gateway_id>/<policy_id>.
    gatewayId String
    Specifies the ID of the dedicated gateway instance to which the APIs and the ACL policy belong. Changing this will create a new resource.
    policyId String
    Specifies the ACL Policy ID for APIs binding. Changing this will create a new resource.
    publishIds List<String>
    Specifies the publishing IDs corresponding to the APIs bound by the ACL policy.
    apigwAclPolicyAssociateV2Id String
    Resource ID. The format is <gateway_id>/<policy_id>.
    gatewayId string
    Specifies the ID of the dedicated gateway instance to which the APIs and the ACL policy belong. Changing this will create a new resource.
    policyId string
    Specifies the ACL Policy ID for APIs binding. Changing this will create a new resource.
    publishIds string[]
    Specifies the publishing IDs corresponding to the APIs bound by the ACL policy.
    apigwAclPolicyAssociateV2Id string
    Resource ID. The format is <gateway_id>/<policy_id>.
    gateway_id str
    Specifies the ID of the dedicated gateway instance to which the APIs and the ACL policy belong. Changing this will create a new resource.
    policy_id str
    Specifies the ACL Policy ID for APIs binding. Changing this will create a new resource.
    publish_ids Sequence[str]
    Specifies the publishing IDs corresponding to the APIs bound by the ACL policy.
    apigw_acl_policy_associate_v2_id str
    Resource ID. The format is <gateway_id>/<policy_id>.
    gatewayId String
    Specifies the ID of the dedicated gateway instance to which the APIs and the ACL policy belong. Changing this will create a new resource.
    policyId String
    Specifies the ACL Policy ID for APIs binding. Changing this will create a new resource.
    publishIds List<String>
    Specifies the publishing IDs corresponding to the APIs bound by the ACL policy.
    apigwAclPolicyAssociateV2Id String
    Resource ID. The format is <gateway_id>/<policy_id>.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ApigwAclPolicyAssociateV2 resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Region string
    Specifies the region where the dedicated instance and the throttling policy are located.
    Id string
    The provider-assigned unique ID for this managed resource.
    Region string
    Specifies the region where the dedicated instance and the throttling policy are located.
    id String
    The provider-assigned unique ID for this managed resource.
    region String
    Specifies the region where the dedicated instance and the throttling policy are located.
    id string
    The provider-assigned unique ID for this managed resource.
    region string
    Specifies the region where the dedicated instance and the throttling policy are located.
    id str
    The provider-assigned unique ID for this managed resource.
    region str
    Specifies the region where the dedicated instance and the throttling policy are located.
    id String
    The provider-assigned unique ID for this managed resource.
    region String
    Specifies the region where the dedicated instance and the throttling policy are located.

    Look up Existing ApigwAclPolicyAssociateV2 Resource

    Get an existing ApigwAclPolicyAssociateV2 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?: ApigwAclPolicyAssociateV2State, opts?: CustomResourceOptions): ApigwAclPolicyAssociateV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            apigw_acl_policy_associate_v2_id: Optional[str] = None,
            gateway_id: Optional[str] = None,
            policy_id: Optional[str] = None,
            publish_ids: Optional[Sequence[str]] = None,
            region: Optional[str] = None) -> ApigwAclPolicyAssociateV2
    func GetApigwAclPolicyAssociateV2(ctx *Context, name string, id IDInput, state *ApigwAclPolicyAssociateV2State, opts ...ResourceOption) (*ApigwAclPolicyAssociateV2, error)
    public static ApigwAclPolicyAssociateV2 Get(string name, Input<string> id, ApigwAclPolicyAssociateV2State? state, CustomResourceOptions? opts = null)
    public static ApigwAclPolicyAssociateV2 get(String name, Output<String> id, ApigwAclPolicyAssociateV2State state, CustomResourceOptions options)
    resources:  _:    type: opentelekomcloud:ApigwAclPolicyAssociateV2    get:      id: ${id}
    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:
    ApigwAclPolicyAssociateV2Id string
    Resource ID. The format is <gateway_id>/<policy_id>.
    GatewayId string
    Specifies the ID of the dedicated gateway instance to which the APIs and the ACL policy belong. Changing this will create a new resource.
    PolicyId string
    Specifies the ACL Policy ID for APIs binding. Changing this will create a new resource.
    PublishIds List<string>
    Specifies the publishing IDs corresponding to the APIs bound by the ACL policy.
    Region string
    Specifies the region where the dedicated instance and the throttling policy are located.
    ApigwAclPolicyAssociateV2Id string
    Resource ID. The format is <gateway_id>/<policy_id>.
    GatewayId string
    Specifies the ID of the dedicated gateway instance to which the APIs and the ACL policy belong. Changing this will create a new resource.
    PolicyId string
    Specifies the ACL Policy ID for APIs binding. Changing this will create a new resource.
    PublishIds []string
    Specifies the publishing IDs corresponding to the APIs bound by the ACL policy.
    Region string
    Specifies the region where the dedicated instance and the throttling policy are located.
    apigwAclPolicyAssociateV2Id String
    Resource ID. The format is <gateway_id>/<policy_id>.
    gatewayId String
    Specifies the ID of the dedicated gateway instance to which the APIs and the ACL policy belong. Changing this will create a new resource.
    policyId String
    Specifies the ACL Policy ID for APIs binding. Changing this will create a new resource.
    publishIds List<String>
    Specifies the publishing IDs corresponding to the APIs bound by the ACL policy.
    region String
    Specifies the region where the dedicated instance and the throttling policy are located.
    apigwAclPolicyAssociateV2Id string
    Resource ID. The format is <gateway_id>/<policy_id>.
    gatewayId string
    Specifies the ID of the dedicated gateway instance to which the APIs and the ACL policy belong. Changing this will create a new resource.
    policyId string
    Specifies the ACL Policy ID for APIs binding. Changing this will create a new resource.
    publishIds string[]
    Specifies the publishing IDs corresponding to the APIs bound by the ACL policy.
    region string
    Specifies the region where the dedicated instance and the throttling policy are located.
    apigw_acl_policy_associate_v2_id str
    Resource ID. The format is <gateway_id>/<policy_id>.
    gateway_id str
    Specifies the ID of the dedicated gateway instance to which the APIs and the ACL policy belong. Changing this will create a new resource.
    policy_id str
    Specifies the ACL Policy ID for APIs binding. Changing this will create a new resource.
    publish_ids Sequence[str]
    Specifies the publishing IDs corresponding to the APIs bound by the ACL policy.
    region str
    Specifies the region where the dedicated instance and the throttling policy are located.
    apigwAclPolicyAssociateV2Id String
    Resource ID. The format is <gateway_id>/<policy_id>.
    gatewayId String
    Specifies the ID of the dedicated gateway instance to which the APIs and the ACL policy belong. Changing this will create a new resource.
    policyId String
    Specifies the ACL Policy ID for APIs binding. Changing this will create a new resource.
    publishIds List<String>
    Specifies the publishing IDs corresponding to the APIs bound by the ACL policy.
    region String
    Specifies the region where the dedicated instance and the throttling policy are located.

    Import

    Associate resources can be imported using their policy_id and the APIG gateway instance ID to which the policy

    belongs, separated by a slash, e.g.

    bash

    $ pulumi import opentelekomcloud:index/apigwAclPolicyAssociateV2:ApigwAclPolicyAssociateV2 test <gateway_id>/<policy_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
    License
    Notes
    This Pulumi package is based on the opentelekomcloud Terraform Provider.
    opentelekomcloud logo
    opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud