1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. ApigwThrottlingPolicyAssociateV2
opentelekomcloud 1.36.35 published on Monday, Apr 14, 2025 by opentelekomcloud

opentelekomcloud.ApigwThrottlingPolicyAssociateV2

Explore with Pulumi AI

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

This API is used to bind a request throttling policy to an API that has been published in an environment within OpenTelekomCloud. You can bind different request throttling policies to an API in different environments, but can bind only one request throttling policy to the API in each environment.

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 publishIds = config.requireObject<Array<string>>("publishIds");
const tpa = new opentelekomcloud.ApigwThrottlingPolicyAssociateV2("tpa", {
    gatewayId: gatewayId,
    policyId: policyId,
    publishIds: publishIds,
});
Copy
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud

config = pulumi.Config()
gateway_id = config.require_object("gatewayId")
policy_id = config.require_object("policyId")
publish_ids = config.require_object("publishIds")
tpa = opentelekomcloud.ApigwThrottlingPolicyAssociateV2("tpa",
    gateway_id=gateway_id,
    policy_id=policy_id,
    publish_ids=publish_ids)
Copy
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")
		publishIds := cfg.Require("publishIds")
		_, err := opentelekomcloud.NewApigwThrottlingPolicyAssociateV2(ctx, "tpa", &opentelekomcloud.ApigwThrottlingPolicyAssociateV2Args{
			GatewayId:  pulumi.Any(gatewayId),
			PolicyId:   pulumi.Any(policyId),
			PublishIds: publishIds,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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 publishIds = config.RequireObject<string[]>("publishIds");
    var tpa = new Opentelekomcloud.ApigwThrottlingPolicyAssociateV2("tpa", new()
    {
        GatewayId = gatewayId,
        PolicyId = policyId,
        PublishIds = publishIds,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.ApigwThrottlingPolicyAssociateV2;
import com.pulumi.opentelekomcloud.ApigwThrottlingPolicyAssociateV2Args;
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 publishIds = config.get("publishIds");
        var tpa = new ApigwThrottlingPolicyAssociateV2("tpa", ApigwThrottlingPolicyAssociateV2Args.builder()
            .gatewayId(gatewayId)
            .policyId(policyId)
            .publishIds(publishIds)
            .build());

    }
}
Copy
configuration:
  gatewayId:
    type: dynamic
  policyId:
    type: dynamic
  publishIds:
    type: list(string)
resources:
  tpa:
    type: opentelekomcloud:ApigwThrottlingPolicyAssociateV2
    properties:
      gatewayId: ${gatewayId}
      policyId: ${policyId}
      publishIds: ${publishIds}
Copy

Create ApigwThrottlingPolicyAssociateV2 Resource

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

Constructor syntax

new ApigwThrottlingPolicyAssociateV2(name: string, args: ApigwThrottlingPolicyAssociateV2Args, opts?: CustomResourceOptions);
@overload
def ApigwThrottlingPolicyAssociateV2(resource_name: str,
                                     args: ApigwThrottlingPolicyAssociateV2Args,
                                     opts: Optional[ResourceOptions] = None)

@overload
def ApigwThrottlingPolicyAssociateV2(resource_name: str,
                                     opts: Optional[ResourceOptions] = None,
                                     gateway_id: Optional[str] = None,
                                     policy_id: Optional[str] = None,
                                     publish_ids: Optional[Sequence[str]] = None,
                                     apigw_throttling_policy_associate_v2_id: Optional[str] = None)
func NewApigwThrottlingPolicyAssociateV2(ctx *Context, name string, args ApigwThrottlingPolicyAssociateV2Args, opts ...ResourceOption) (*ApigwThrottlingPolicyAssociateV2, error)
public ApigwThrottlingPolicyAssociateV2(string name, ApigwThrottlingPolicyAssociateV2Args args, CustomResourceOptions? opts = null)
public ApigwThrottlingPolicyAssociateV2(String name, ApigwThrottlingPolicyAssociateV2Args args)
public ApigwThrottlingPolicyAssociateV2(String name, ApigwThrottlingPolicyAssociateV2Args args, CustomResourceOptions options)
type: opentelekomcloud:ApigwThrottlingPolicyAssociateV2
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ApigwThrottlingPolicyAssociateV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ApigwThrottlingPolicyAssociateV2Args
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ApigwThrottlingPolicyAssociateV2Args
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ApigwThrottlingPolicyAssociateV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ApigwThrottlingPolicyAssociateV2Args
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 apigwThrottlingPolicyAssociateV2Resource = new Opentelekomcloud.ApigwThrottlingPolicyAssociateV2("apigwThrottlingPolicyAssociateV2Resource", new()
{
    GatewayId = "string",
    PolicyId = "string",
    PublishIds = new[]
    {
        "string",
    },
    ApigwThrottlingPolicyAssociateV2Id = "string",
});
Copy
example, err := opentelekomcloud.NewApigwThrottlingPolicyAssociateV2(ctx, "apigwThrottlingPolicyAssociateV2Resource", &opentelekomcloud.ApigwThrottlingPolicyAssociateV2Args{
	GatewayId: pulumi.String("string"),
	PolicyId:  pulumi.String("string"),
	PublishIds: pulumi.StringArray{
		pulumi.String("string"),
	},
	ApigwThrottlingPolicyAssociateV2Id: pulumi.String("string"),
})
Copy
var apigwThrottlingPolicyAssociateV2Resource = new ApigwThrottlingPolicyAssociateV2("apigwThrottlingPolicyAssociateV2Resource", ApigwThrottlingPolicyAssociateV2Args.builder()
    .gatewayId("string")
    .policyId("string")
    .publishIds("string")
    .apigwThrottlingPolicyAssociateV2Id("string")
    .build());
Copy
apigw_throttling_policy_associate_v2_resource = opentelekomcloud.ApigwThrottlingPolicyAssociateV2("apigwThrottlingPolicyAssociateV2Resource",
    gateway_id="string",
    policy_id="string",
    publish_ids=["string"],
    apigw_throttling_policy_associate_v2_id="string")
Copy
const apigwThrottlingPolicyAssociateV2Resource = new opentelekomcloud.ApigwThrottlingPolicyAssociateV2("apigwThrottlingPolicyAssociateV2Resource", {
    gatewayId: "string",
    policyId: "string",
    publishIds: ["string"],
    apigwThrottlingPolicyAssociateV2Id: "string",
});
Copy
type: opentelekomcloud:ApigwThrottlingPolicyAssociateV2
properties:
    apigwThrottlingPolicyAssociateV2Id: string
    gatewayId: string
    policyId: string
    publishIds:
        - string
Copy

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

GatewayId This property is required. string
Specifies the ID of the dedicated gateway to which the APIs and the throttling policy belongs. Changing this will create a new resource.
PolicyId This property is required. string
Specifies the ID of the throttling policy. Changing this will create a new resource.
PublishIds This property is required. List<string>
Specifies the publishing IDs corresponding to the APIs bound by the throttling policy.
ApigwThrottlingPolicyAssociateV2Id string
Resource ID. The format is <gateway_id>/<policy_id>.
GatewayId This property is required. string
Specifies the ID of the dedicated gateway to which the APIs and the throttling policy belongs. Changing this will create a new resource.
PolicyId This property is required. string
Specifies the ID of the throttling policy. Changing this will create a new resource.
PublishIds This property is required. []string
Specifies the publishing IDs corresponding to the APIs bound by the throttling policy.
ApigwThrottlingPolicyAssociateV2Id string
Resource ID. The format is <gateway_id>/<policy_id>.
gatewayId This property is required. String
Specifies the ID of the dedicated gateway to which the APIs and the throttling policy belongs. Changing this will create a new resource.
policyId This property is required. String
Specifies the ID of the throttling policy. Changing this will create a new resource.
publishIds This property is required. List<String>
Specifies the publishing IDs corresponding to the APIs bound by the throttling policy.
apigwThrottlingPolicyAssociateV2Id String
Resource ID. The format is <gateway_id>/<policy_id>.
gatewayId This property is required. string
Specifies the ID of the dedicated gateway to which the APIs and the throttling policy belongs. Changing this will create a new resource.
policyId This property is required. string
Specifies the ID of the throttling policy. Changing this will create a new resource.
publishIds This property is required. string[]
Specifies the publishing IDs corresponding to the APIs bound by the throttling policy.
apigwThrottlingPolicyAssociateV2Id string
Resource ID. The format is <gateway_id>/<policy_id>.
gateway_id This property is required. str
Specifies the ID of the dedicated gateway to which the APIs and the throttling policy belongs. Changing this will create a new resource.
policy_id This property is required. str
Specifies the ID of the throttling policy. Changing this will create a new resource.
publish_ids This property is required. Sequence[str]
Specifies the publishing IDs corresponding to the APIs bound by the throttling policy.
apigw_throttling_policy_associate_v2_id str
Resource ID. The format is <gateway_id>/<policy_id>.
gatewayId This property is required. String
Specifies the ID of the dedicated gateway to which the APIs and the throttling policy belongs. Changing this will create a new resource.
policyId This property is required. String
Specifies the ID of the throttling policy. Changing this will create a new resource.
publishIds This property is required. List<String>
Specifies the publishing IDs corresponding to the APIs bound by the throttling policy.
apigwThrottlingPolicyAssociateV2Id String
Resource ID. The format is <gateway_id>/<policy_id>.

Outputs

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

Get an existing ApigwThrottlingPolicyAssociateV2 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?: ApigwThrottlingPolicyAssociateV2State, opts?: CustomResourceOptions): ApigwThrottlingPolicyAssociateV2
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        apigw_throttling_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) -> ApigwThrottlingPolicyAssociateV2
func GetApigwThrottlingPolicyAssociateV2(ctx *Context, name string, id IDInput, state *ApigwThrottlingPolicyAssociateV2State, opts ...ResourceOption) (*ApigwThrottlingPolicyAssociateV2, error)
public static ApigwThrottlingPolicyAssociateV2 Get(string name, Input<string> id, ApigwThrottlingPolicyAssociateV2State? state, CustomResourceOptions? opts = null)
public static ApigwThrottlingPolicyAssociateV2 get(String name, Output<String> id, ApigwThrottlingPolicyAssociateV2State state, CustomResourceOptions options)
resources:  _:    type: opentelekomcloud:ApigwThrottlingPolicyAssociateV2    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
ApigwThrottlingPolicyAssociateV2Id string
Resource ID. The format is <gateway_id>/<policy_id>.
GatewayId string
Specifies the ID of the dedicated gateway to which the APIs and the throttling policy belongs. Changing this will create a new resource.
PolicyId string
Specifies the ID of the throttling policy. Changing this will create a new resource.
PublishIds List<string>
Specifies the publishing IDs corresponding to the APIs bound by the throttling policy.
Region string
Specifies the region where the dedicated instance and the throttling policy are located.
ApigwThrottlingPolicyAssociateV2Id string
Resource ID. The format is <gateway_id>/<policy_id>.
GatewayId string
Specifies the ID of the dedicated gateway to which the APIs and the throttling policy belongs. Changing this will create a new resource.
PolicyId string
Specifies the ID of the throttling policy. Changing this will create a new resource.
PublishIds []string
Specifies the publishing IDs corresponding to the APIs bound by the throttling policy.
Region string
Specifies the region where the dedicated instance and the throttling policy are located.
apigwThrottlingPolicyAssociateV2Id String
Resource ID. The format is <gateway_id>/<policy_id>.
gatewayId String
Specifies the ID of the dedicated gateway to which the APIs and the throttling policy belongs. Changing this will create a new resource.
policyId String
Specifies the ID of the throttling policy. Changing this will create a new resource.
publishIds List<String>
Specifies the publishing IDs corresponding to the APIs bound by the throttling policy.
region String
Specifies the region where the dedicated instance and the throttling policy are located.
apigwThrottlingPolicyAssociateV2Id string
Resource ID. The format is <gateway_id>/<policy_id>.
gatewayId string
Specifies the ID of the dedicated gateway to which the APIs and the throttling policy belongs. Changing this will create a new resource.
policyId string
Specifies the ID of the throttling policy. Changing this will create a new resource.
publishIds string[]
Specifies the publishing IDs corresponding to the APIs bound by the throttling policy.
region string
Specifies the region where the dedicated instance and the throttling policy are located.
apigw_throttling_policy_associate_v2_id str
Resource ID. The format is <gateway_id>/<policy_id>.
gateway_id str
Specifies the ID of the dedicated gateway to which the APIs and the throttling policy belongs. Changing this will create a new resource.
policy_id str
Specifies the ID of the throttling policy. Changing this will create a new resource.
publish_ids Sequence[str]
Specifies the publishing IDs corresponding to the APIs bound by the throttling policy.
region str
Specifies the region where the dedicated instance and the throttling policy are located.
apigwThrottlingPolicyAssociateV2Id String
Resource ID. The format is <gateway_id>/<policy_id>.
gatewayId String
Specifies the ID of the dedicated gateway to which the APIs and the throttling policy belongs. Changing this will create a new resource.
policyId String
Specifies the ID of the throttling policy. Changing this will create a new resource.
publishIds List<String>
Specifies the publishing IDs corresponding to the APIs bound by the throttling policy.
region String
Specifies the region where the dedicated instance and the throttling policy are located.

Import

Resources can be imported using their policy_id and the APIGW dedicated gateway ID to which the policy

belongs, separated by a slash, e.g.

$ pulumi import opentelekomcloud:index/apigwThrottlingPolicyAssociateV2:ApigwThrottlingPolicyAssociateV2 tpa <gateway_id>/<policy_id>
Copy

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.