flexibleengine.ApigThrottlingPolicyAssociate
Explore with Pulumi AI
Use this resource to bind the APIs to the throttling policy within FlexibleEngine.
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 apiPublishId1 = config.requireObject("apiPublishId1");
const apiPublishId2 = config.requireObject("apiPublishId2");
const test = new flexibleengine.ApigThrottlingPolicyAssociate("test", {
instanceId: instanceId,
policyId: policyId,
publishIds: [
apiPublishId1,
apiPublishId2,
],
});
import pulumi
import pulumi_flexibleengine as flexibleengine
config = pulumi.Config()
instance_id = config.require_object("instanceId")
policy_id = config.require_object("policyId")
api_publish_id1 = config.require_object("apiPublishId1")
api_publish_id2 = config.require_object("apiPublishId2")
test = flexibleengine.ApigThrottlingPolicyAssociate("test",
instance_id=instance_id,
policy_id=policy_id,
publish_ids=[
api_publish_id1,
api_publish_id2,
])
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")
apiPublishId1 := cfg.RequireObject("apiPublishId1")
apiPublishId2 := cfg.RequireObject("apiPublishId2")
_, err := flexibleengine.NewApigThrottlingPolicyAssociate(ctx, "test", &flexibleengine.ApigThrottlingPolicyAssociateArgs{
InstanceId: pulumi.Any(instanceId),
PolicyId: pulumi.Any(policyId),
PublishIds: pulumi.StringArray{
apiPublishId1,
apiPublishId2,
},
})
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 apiPublishId1 = config.RequireObject<dynamic>("apiPublishId1");
var apiPublishId2 = config.RequireObject<dynamic>("apiPublishId2");
var test = new Flexibleengine.ApigThrottlingPolicyAssociate("test", new()
{
InstanceId = instanceId,
PolicyId = policyId,
PublishIds = new[]
{
apiPublishId1,
apiPublishId2,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.ApigThrottlingPolicyAssociate;
import com.pulumi.flexibleengine.ApigThrottlingPolicyAssociateArgs;
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 apiPublishId1 = config.get("apiPublishId1");
final var apiPublishId2 = config.get("apiPublishId2");
var test = new ApigThrottlingPolicyAssociate("test", ApigThrottlingPolicyAssociateArgs.builder()
.instanceId(instanceId)
.policyId(policyId)
.publishIds(
apiPublishId1,
apiPublishId2)
.build());
}
}
configuration:
instanceId:
type: dynamic
policyId:
type: dynamic
apiPublishId1:
type: dynamic
apiPublishId2:
type: dynamic
resources:
test:
type: flexibleengine:ApigThrottlingPolicyAssociate
properties:
instanceId: ${instanceId}
policyId: ${policyId}
publishIds:
- ${apiPublishId1}
- ${apiPublishId2}
Create ApigThrottlingPolicyAssociate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ApigThrottlingPolicyAssociate(name: string, args: ApigThrottlingPolicyAssociateArgs, opts?: CustomResourceOptions);
@overload
def ApigThrottlingPolicyAssociate(resource_name: str,
args: ApigThrottlingPolicyAssociateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ApigThrottlingPolicyAssociate(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
policy_id: Optional[str] = None,
publish_ids: Optional[Sequence[str]] = None,
apig_throttling_policy_associate_id: Optional[str] = None,
region: Optional[str] = None)
func NewApigThrottlingPolicyAssociate(ctx *Context, name string, args ApigThrottlingPolicyAssociateArgs, opts ...ResourceOption) (*ApigThrottlingPolicyAssociate, error)
public ApigThrottlingPolicyAssociate(string name, ApigThrottlingPolicyAssociateArgs args, CustomResourceOptions? opts = null)
public ApigThrottlingPolicyAssociate(String name, ApigThrottlingPolicyAssociateArgs args)
public ApigThrottlingPolicyAssociate(String name, ApigThrottlingPolicyAssociateArgs args, CustomResourceOptions options)
type: flexibleengine:ApigThrottlingPolicyAssociate
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 ApigThrottlingPolicyAssociateArgs
- 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 ApigThrottlingPolicyAssociateArgs
- 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 ApigThrottlingPolicyAssociateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApigThrottlingPolicyAssociateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApigThrottlingPolicyAssociateArgs
- 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 apigThrottlingPolicyAssociateResource = new Flexibleengine.ApigThrottlingPolicyAssociate("apigThrottlingPolicyAssociateResource", new()
{
InstanceId = "string",
PolicyId = "string",
PublishIds = new[]
{
"string",
},
ApigThrottlingPolicyAssociateId = "string",
Region = "string",
});
example, err := flexibleengine.NewApigThrottlingPolicyAssociate(ctx, "apigThrottlingPolicyAssociateResource", &flexibleengine.ApigThrottlingPolicyAssociateArgs{
InstanceId: pulumi.String("string"),
PolicyId: pulumi.String("string"),
PublishIds: pulumi.StringArray{
pulumi.String("string"),
},
ApigThrottlingPolicyAssociateId: pulumi.String("string"),
Region: pulumi.String("string"),
})
var apigThrottlingPolicyAssociateResource = new ApigThrottlingPolicyAssociate("apigThrottlingPolicyAssociateResource", ApigThrottlingPolicyAssociateArgs.builder()
.instanceId("string")
.policyId("string")
.publishIds("string")
.apigThrottlingPolicyAssociateId("string")
.region("string")
.build());
apig_throttling_policy_associate_resource = flexibleengine.ApigThrottlingPolicyAssociate("apigThrottlingPolicyAssociateResource",
instance_id="string",
policy_id="string",
publish_ids=["string"],
apig_throttling_policy_associate_id="string",
region="string")
const apigThrottlingPolicyAssociateResource = new flexibleengine.ApigThrottlingPolicyAssociate("apigThrottlingPolicyAssociateResource", {
instanceId: "string",
policyId: "string",
publishIds: ["string"],
apigThrottlingPolicyAssociateId: "string",
region: "string",
});
type: flexibleengine:ApigThrottlingPolicyAssociate
properties:
apigThrottlingPolicyAssociateId: string
instanceId: string
policyId: string
publishIds:
- string
region: string
ApigThrottlingPolicyAssociate 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 ApigThrottlingPolicyAssociate resource accepts the following input properties:
- Instance
Id string - Specifies the ID of the APIG dedicated instance to which the APIs and the throttling policy belongs. Changing this will create a new resource.
- Policy
Id string - Specifies the ID of the API group to which the API response belongs to. Changing this will create a new resource.
- Publish
Ids List<string> - Specifies the publish ID corresponding to the API bound by the throttling policy.
- Apig
Throttling stringPolicy Associate Id - Resource ID. The format is
<instance_id>/<policy_id>
. - Region string
- Specifies the region where the API instance and throttling policy are located. If omitted, the provider-level region will be used. Changing this will create a new resource.
- Instance
Id string - Specifies the ID of the APIG dedicated instance to which the APIs and the throttling policy belongs. Changing this will create a new resource.
- Policy
Id string - Specifies the ID of the API group to which the API response belongs to. Changing this will create a new resource.
- Publish
Ids []string - Specifies the publish ID corresponding to the API bound by the throttling policy.
- Apig
Throttling stringPolicy Associate Id - Resource ID. The format is
<instance_id>/<policy_id>
. - Region string
- Specifies the region where the API instance and throttling policy are located. If omitted, the provider-level region will be used. Changing this will create a new resource.
- instance
Id String - Specifies the ID of the APIG dedicated instance to which the APIs and the throttling policy belongs. Changing this will create a new resource.
- policy
Id String - Specifies the ID of the API group to which the API response belongs to. Changing this will create a new resource.
- publish
Ids List<String> - Specifies the publish ID corresponding to the API bound by the throttling policy.
- apig
Throttling StringPolicy Associate Id - Resource ID. The format is
<instance_id>/<policy_id>
. - region String
- Specifies the region where the API instance and throttling policy are located. If omitted, the provider-level region will be used. Changing this will create a new resource.
- instance
Id string - Specifies the ID of the APIG dedicated instance to which the APIs and the throttling policy belongs. Changing this will create a new resource.
- policy
Id string - Specifies the ID of the API group to which the API response belongs to. Changing this will create a new resource.
- publish
Ids string[] - Specifies the publish ID corresponding to the API bound by the throttling policy.
- apig
Throttling stringPolicy Associate Id - Resource ID. The format is
<instance_id>/<policy_id>
. - region string
- Specifies the region where the API instance and throttling policy 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 APIG dedicated instance to which the APIs and the throttling policy belongs. Changing this will create a new resource.
- policy_
id str - Specifies the ID of the API group to which the API response belongs to. Changing this will create a new resource.
- publish_
ids Sequence[str] - Specifies the publish ID corresponding to the API bound by the throttling policy.
- apig_
throttling_ strpolicy_ associate_ id - Resource ID. The format is
<instance_id>/<policy_id>
. - region str
- Specifies the region where the API instance and throttling policy are located. If omitted, the provider-level region will be used. Changing this will create a new resource.
- instance
Id String - Specifies the ID of the APIG dedicated instance to which the APIs and the throttling policy belongs. Changing this will create a new resource.
- policy
Id String - Specifies the ID of the API group to which the API response belongs to. Changing this will create a new resource.
- publish
Ids List<String> - Specifies the publish ID corresponding to the API bound by the throttling policy.
- apig
Throttling StringPolicy Associate Id - Resource ID. The format is
<instance_id>/<policy_id>
. - region String
- Specifies the region where the API instance and throttling policy 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 ApigThrottlingPolicyAssociate 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 ApigThrottlingPolicyAssociate Resource
Get an existing ApigThrottlingPolicyAssociate 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?: ApigThrottlingPolicyAssociateState, opts?: CustomResourceOptions): ApigThrottlingPolicyAssociate
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
apig_throttling_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) -> ApigThrottlingPolicyAssociate
func GetApigThrottlingPolicyAssociate(ctx *Context, name string, id IDInput, state *ApigThrottlingPolicyAssociateState, opts ...ResourceOption) (*ApigThrottlingPolicyAssociate, error)
public static ApigThrottlingPolicyAssociate Get(string name, Input<string> id, ApigThrottlingPolicyAssociateState? state, CustomResourceOptions? opts = null)
public static ApigThrottlingPolicyAssociate get(String name, Output<String> id, ApigThrottlingPolicyAssociateState state, CustomResourceOptions options)
resources: _: type: flexibleengine:ApigThrottlingPolicyAssociate 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.
- Apig
Throttling stringPolicy Associate Id - Resource ID. The format is
<instance_id>/<policy_id>
. - Instance
Id string - Specifies the ID of the APIG dedicated instance to which the APIs and the throttling policy belongs. Changing this will create a new resource.
- Policy
Id string - Specifies the ID of the API group to which the API response belongs to. Changing this will create a new resource.
- Publish
Ids List<string> - Specifies the publish ID corresponding to the API bound by the throttling policy.
- Region string
- Specifies the region where the API instance and throttling policy are located. If omitted, the provider-level region will be used. Changing this will create a new resource.
- Apig
Throttling stringPolicy Associate Id - Resource ID. The format is
<instance_id>/<policy_id>
. - Instance
Id string - Specifies the ID of the APIG dedicated instance to which the APIs and the throttling policy belongs. Changing this will create a new resource.
- Policy
Id string - Specifies the ID of the API group to which the API response belongs to. Changing this will create a new resource.
- Publish
Ids []string - Specifies the publish ID corresponding to the API bound by the throttling policy.
- Region string
- Specifies the region where the API instance and throttling policy are located. If omitted, the provider-level region will be used. Changing this will create a new resource.
- apig
Throttling StringPolicy Associate Id - Resource ID. The format is
<instance_id>/<policy_id>
. - instance
Id String - Specifies the ID of the APIG dedicated instance to which the APIs and the throttling policy belongs. Changing this will create a new resource.
- policy
Id String - Specifies the ID of the API group to which the API response belongs to. Changing this will create a new resource.
- publish
Ids List<String> - Specifies the publish ID corresponding to the API bound by the throttling policy.
- region String
- Specifies the region where the API instance and throttling policy are located. If omitted, the provider-level region will be used. Changing this will create a new resource.
- apig
Throttling stringPolicy Associate Id - Resource ID. The format is
<instance_id>/<policy_id>
. - instance
Id string - Specifies the ID of the APIG dedicated instance to which the APIs and the throttling policy belongs. Changing this will create a new resource.
- policy
Id string - Specifies the ID of the API group to which the API response belongs to. Changing this will create a new resource.
- publish
Ids string[] - Specifies the publish ID corresponding to the API bound by the throttling policy.
- region string
- Specifies the region where the API instance and throttling policy are located. If omitted, the provider-level region will be used. Changing this will create a new resource.
- apig_
throttling_ strpolicy_ associate_ id - Resource ID. The format is
<instance_id>/<policy_id>
. - instance_
id str - Specifies the ID of the APIG dedicated instance to which the APIs and the throttling policy belongs. Changing this will create a new resource.
- policy_
id str - Specifies the ID of the API group to which the API response belongs to. Changing this will create a new resource.
- publish_
ids Sequence[str] - Specifies the publish ID corresponding to the API bound by the throttling policy.
- region str
- Specifies the region where the API instance and throttling policy are located. If omitted, the provider-level region will be used. Changing this will create a new resource.
- apig
Throttling StringPolicy Associate Id - Resource ID. The format is
<instance_id>/<policy_id>
. - instance
Id String - Specifies the ID of the APIG dedicated instance to which the APIs and the throttling policy belongs. Changing this will create a new resource.
- policy
Id String - Specifies the ID of the API group to which the API response belongs to. Changing this will create a new resource.
- publish
Ids List<String> - Specifies the publish ID corresponding to the API bound by the throttling policy.
- region String
- Specifies the region where the API instance and throttling policy 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 the APIG dedicated instance ID to which the policy
belongs and policy_id
, separated by a slash, e.g.
$ pulumi import flexibleengine:index/apigThrottlingPolicyAssociate:ApigThrottlingPolicyAssociate 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.