1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. ApigAclPolicyAssociate
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

flexibleengine.ApigAclPolicyAssociate

Explore with Pulumi AI

flexibleengine logo
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

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

    An ACL policy can only create one flexibleengine.ApigAclPolicyAssociate resource.

    Example Usage

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

    Create ApigAclPolicyAssociate Resource

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

    Constructor syntax

    new ApigAclPolicyAssociate(name: string, args: ApigAclPolicyAssociateArgs, opts?: CustomResourceOptions);
    @overload
    def ApigAclPolicyAssociate(resource_name: str,
                               args: ApigAclPolicyAssociateArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApigAclPolicyAssociate(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               instance_id: Optional[str] = None,
                               policy_id: Optional[str] = None,
                               publish_ids: Optional[Sequence[str]] = None,
                               apig_acl_policy_associate_id: Optional[str] = None,
                               region: Optional[str] = None)
    func NewApigAclPolicyAssociate(ctx *Context, name string, args ApigAclPolicyAssociateArgs, opts ...ResourceOption) (*ApigAclPolicyAssociate, error)
    public ApigAclPolicyAssociate(string name, ApigAclPolicyAssociateArgs args, CustomResourceOptions? opts = null)
    public ApigAclPolicyAssociate(String name, ApigAclPolicyAssociateArgs args)
    public ApigAclPolicyAssociate(String name, ApigAclPolicyAssociateArgs args, CustomResourceOptions options)
    
    type: flexibleengine:ApigAclPolicyAssociate
    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 ApigAclPolicyAssociateArgs
    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 ApigAclPolicyAssociateArgs
    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 ApigAclPolicyAssociateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApigAclPolicyAssociateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApigAclPolicyAssociateArgs
    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 apigAclPolicyAssociateResource = new Flexibleengine.ApigAclPolicyAssociate("apigAclPolicyAssociateResource", new()
    {
        InstanceId = "string",
        PolicyId = "string",
        PublishIds = new[]
        {
            "string",
        },
        ApigAclPolicyAssociateId = "string",
        Region = "string",
    });
    
    example, err := flexibleengine.NewApigAclPolicyAssociate(ctx, "apigAclPolicyAssociateResource", &flexibleengine.ApigAclPolicyAssociateArgs{
    	InstanceId: pulumi.String("string"),
    	PolicyId:   pulumi.String("string"),
    	PublishIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ApigAclPolicyAssociateId: pulumi.String("string"),
    	Region:                   pulumi.String("string"),
    })
    
    var apigAclPolicyAssociateResource = new ApigAclPolicyAssociate("apigAclPolicyAssociateResource", ApigAclPolicyAssociateArgs.builder()
        .instanceId("string")
        .policyId("string")
        .publishIds("string")
        .apigAclPolicyAssociateId("string")
        .region("string")
        .build());
    
    apig_acl_policy_associate_resource = flexibleengine.ApigAclPolicyAssociate("apigAclPolicyAssociateResource",
        instance_id="string",
        policy_id="string",
        publish_ids=["string"],
        apig_acl_policy_associate_id="string",
        region="string")
    
    const apigAclPolicyAssociateResource = new flexibleengine.ApigAclPolicyAssociate("apigAclPolicyAssociateResource", {
        instanceId: "string",
        policyId: "string",
        publishIds: ["string"],
        apigAclPolicyAssociateId: "string",
        region: "string",
    });
    
    type: flexibleengine:ApigAclPolicyAssociate
    properties:
        apigAclPolicyAssociateId: string
        instanceId: string
        policyId: string
        publishIds:
            - string
        region: string
    

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

    InstanceId string
    Specifies the ID of the dedicated 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 publish IDs corresponding to the APIs bound by the ACL policy.
    ApigAclPolicyAssociateId string
    Resource ID. The format is <instance_id>/<policy_id>.
    Region string
    Specifies the region where the ACL policy and the APIs are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    InstanceId string
    Specifies the ID of the dedicated 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 publish IDs corresponding to the APIs bound by the ACL policy.
    ApigAclPolicyAssociateId string
    Resource ID. The format is <instance_id>/<policy_id>.
    Region string
    Specifies the region where the ACL policy and the APIs are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    instanceId String
    Specifies the ID of the dedicated 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 publish IDs corresponding to the APIs bound by the ACL policy.
    apigAclPolicyAssociateId String
    Resource ID. The format is <instance_id>/<policy_id>.
    region String
    Specifies the region where the ACL policy and the APIs are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    instanceId string
    Specifies the ID of the dedicated 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 publish IDs corresponding to the APIs bound by the ACL policy.
    apigAclPolicyAssociateId string
    Resource ID. The format is <instance_id>/<policy_id>.
    region string
    Specifies the region where the ACL policy and the APIs are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    instance_id str
    Specifies the ID of the dedicated 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 publish IDs corresponding to the APIs bound by the ACL policy.
    apig_acl_policy_associate_id str
    Resource ID. The format is <instance_id>/<policy_id>.
    region str
    Specifies the region where the ACL policy and the APIs are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    instanceId String
    Specifies the ID of the dedicated 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 publish IDs corresponding to the APIs bound by the ACL policy.
    apigAclPolicyAssociateId String
    Resource ID. The format is <instance_id>/<policy_id>.
    region String
    Specifies the region where the ACL policy and the APIs are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.

    Outputs

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

    Get an existing ApigAclPolicyAssociate 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?: ApigAclPolicyAssociateState, opts?: CustomResourceOptions): ApigAclPolicyAssociate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            apig_acl_policy_associate_id: Optional[str] = None,
            instance_id: Optional[str] = None,
            policy_id: Optional[str] = None,
            publish_ids: Optional[Sequence[str]] = None,
            region: Optional[str] = None) -> ApigAclPolicyAssociate
    func GetApigAclPolicyAssociate(ctx *Context, name string, id IDInput, state *ApigAclPolicyAssociateState, opts ...ResourceOption) (*ApigAclPolicyAssociate, error)
    public static ApigAclPolicyAssociate Get(string name, Input<string> id, ApigAclPolicyAssociateState? state, CustomResourceOptions? opts = null)
    public static ApigAclPolicyAssociate get(String name, Output<String> id, ApigAclPolicyAssociateState state, CustomResourceOptions options)
    resources:  _:    type: flexibleengine:ApigAclPolicyAssociate    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:
    ApigAclPolicyAssociateId string
    Resource ID. The format is <instance_id>/<policy_id>.
    InstanceId string
    Specifies the ID of the dedicated 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 publish IDs corresponding to the APIs bound by the ACL policy.
    Region string
    Specifies the region where the ACL policy and the APIs are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    ApigAclPolicyAssociateId string
    Resource ID. The format is <instance_id>/<policy_id>.
    InstanceId string
    Specifies the ID of the dedicated 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 publish IDs corresponding to the APIs bound by the ACL policy.
    Region string
    Specifies the region where the ACL policy and the APIs are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    apigAclPolicyAssociateId String
    Resource ID. The format is <instance_id>/<policy_id>.
    instanceId String
    Specifies the ID of the dedicated 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 publish IDs corresponding to the APIs bound by the ACL policy.
    region String
    Specifies the region where the ACL policy and the APIs are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    apigAclPolicyAssociateId string
    Resource ID. The format is <instance_id>/<policy_id>.
    instanceId string
    Specifies the ID of the dedicated 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 publish IDs corresponding to the APIs bound by the ACL policy.
    region string
    Specifies the region where the ACL policy and the APIs are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    apig_acl_policy_associate_id str
    Resource ID. The format is <instance_id>/<policy_id>.
    instance_id str
    Specifies the ID of the dedicated 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 publish IDs corresponding to the APIs bound by the ACL policy.
    region str
    Specifies the region where the ACL policy and the APIs are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    apigAclPolicyAssociateId String
    Resource ID. The format is <instance_id>/<policy_id>.
    instanceId String
    Specifies the ID of the dedicated 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 publish IDs corresponding to the APIs bound by the ACL policy.
    region String
    Specifies the region where the ACL policy and the APIs are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.

    Import

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

    belongs, separated by a slash, e.g.

    bash

    $ pulumi import flexibleengine:index/apigAclPolicyAssociate:ApigAclPolicyAssociate test <instance_id>/<policy_id>
    

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

    Package Details

    Repository
    flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
    License
    Notes
    This Pulumi package is based on the flexibleengine Terraform Provider.
    flexibleengine logo
    flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud