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,
});
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)
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
})
}
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,
});
});
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());
}
}
configuration:
gatewayId:
type: dynamic
policyId:
type: dynamic
publishIds:
type: list(string)
resources:
tpa:
type: opentelekomcloud:ApigwThrottlingPolicyAssociateV2
properties:
gatewayId: ${gatewayId}
policyId: ${policyId}
publishIds: ${publishIds}
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 string
- The unique name of the resource.
- args ApigwThrottlingPolicyAssociateV2Args
- 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 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 string
- The unique name of the resource.
- args ApigwThrottlingPolicyAssociateV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApigwThrottlingPolicyAssociateV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
var apigwThrottlingPolicyAssociateV2Resource = new ApigwThrottlingPolicyAssociateV2("apigwThrottlingPolicyAssociateV2Resource", ApigwThrottlingPolicyAssociateV2Args.builder()
.gatewayId("string")
.policyId("string")
.publishIds("string")
.apigwThrottlingPolicyAssociateV2Id("string")
.build());
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")
const apigwThrottlingPolicyAssociateV2Resource = new opentelekomcloud.ApigwThrottlingPolicyAssociateV2("apigwThrottlingPolicyAssociateV2Resource", {
gatewayId: "string",
policyId: "string",
publishIds: ["string"],
apigwThrottlingPolicyAssociateV2Id: "string",
});
type: opentelekomcloud:ApigwThrottlingPolicyAssociateV2
properties:
apigwThrottlingPolicyAssociateV2Id: string
gatewayId: string
policyId: string
publishIds:
- string
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:
- Gateway
Id string - 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 string - Specifies the ID of the throttling policy. Changing this will create a new resource.
- Publish
Ids List<string> - Specifies the publishing IDs corresponding to the APIs bound by the throttling policy.
- Apigw
Throttling stringPolicy Associate V2Id - Resource ID. The format is
<gateway_id>/<policy_id>
.
- Gateway
Id string - 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 string - Specifies the ID of the throttling policy. Changing this will create a new resource.
- Publish
Ids []string - Specifies the publishing IDs corresponding to the APIs bound by the throttling policy.
- Apigw
Throttling stringPolicy Associate V2Id - Resource ID. The format is
<gateway_id>/<policy_id>
.
- gateway
Id String - 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 String - Specifies the ID of the throttling policy. Changing this will create a new resource.
- publish
Ids List<String> - Specifies the publishing IDs corresponding to the APIs bound by the throttling policy.
- apigw
Throttling StringPolicy Associate V2Id - Resource ID. The format is
<gateway_id>/<policy_id>
.
- gateway
Id string - 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 string - Specifies the ID of the throttling policy. Changing this will create a new resource.
- publish
Ids string[] - Specifies the publishing IDs corresponding to the APIs bound by the throttling policy.
- apigw
Throttling stringPolicy Associate V2Id - 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.
- apigw_
throttling_ strpolicy_ associate_ v2_ id - Resource ID. The format is
<gateway_id>/<policy_id>
.
- gateway
Id String - 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 String - Specifies the ID of the throttling policy. Changing this will create a new resource.
- publish
Ids List<String> - Specifies the publishing IDs corresponding to the APIs bound by the throttling policy.
- apigw
Throttling StringPolicy Associate V2Id - 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:
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
- 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.
- Apigw
Throttling stringPolicy Associate V2Id - Resource ID. The format is
<gateway_id>/<policy_id>
. - Gateway
Id string - 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 string - Specifies the ID of the throttling policy. Changing this will create a new resource.
- Publish
Ids 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.
- Apigw
Throttling stringPolicy Associate V2Id - Resource ID. The format is
<gateway_id>/<policy_id>
. - Gateway
Id string - 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 string - Specifies the ID of the throttling policy. Changing this will create a new resource.
- Publish
Ids []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 StringPolicy Associate V2Id - Resource ID. The format is
<gateway_id>/<policy_id>
. - gateway
Id String - 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 String - Specifies the ID of the throttling policy. Changing this will create a new resource.
- publish
Ids 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.
- apigw
Throttling stringPolicy Associate V2Id - Resource ID. The format is
<gateway_id>/<policy_id>
. - gateway
Id string - 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 string - Specifies the ID of the throttling policy. Changing this will create a new resource.
- publish
Ids 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_ strpolicy_ associate_ v2_ id - 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.
- apigw
Throttling StringPolicy Associate V2Id - Resource ID. The format is
<gateway_id>/<policy_id>
. - gateway
Id String - 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 String - Specifies the ID of the throttling policy. Changing this will create a new resource.
- publish
Ids 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>
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.