opentelekomcloud.ApigwGatewayFeatureV2
Explore with Pulumi AI
Up-to-date reference of API arguments for API Gateway environment variable service you can get at documentation portal
Manages an APIGW gateway feature resource within OpenTelekomCloud.
For various types of feature parameter configurations, please refer to the documentation.
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 feat = new opentelekomcloud.ApigwGatewayFeatureV2("feat", {
gatewayId: gatewayId,
enabled: true,
config: JSON.stringify({
api_limits: 300,
}),
});
import pulumi
import json
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
gateway_id = config.require_object("gatewayId")
feat = opentelekomcloud.ApigwGatewayFeatureV2("feat",
gateway_id=gateway_id,
enabled=True,
config=json.dumps({
"api_limits": 300,
}))
package main
import (
"encoding/json"
"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")
tmpJSON0, err := json.Marshal(map[string]interface{}{
"api_limits": 300,
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = opentelekomcloud.NewApigwGatewayFeatureV2(ctx, "feat", &opentelekomcloud.ApigwGatewayFeatureV2Args{
GatewayId: pulumi.Any(gatewayId),
Enabled: pulumi.Bool(true),
Config: pulumi.String(json0),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var gatewayId = config.RequireObject<dynamic>("gatewayId");
var feat = new Opentelekomcloud.ApigwGatewayFeatureV2("feat", new()
{
GatewayId = gatewayId,
Enabled = true,
Config = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["api_limits"] = 300,
}),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.ApigwGatewayFeatureV2;
import com.pulumi.opentelekomcloud.ApigwGatewayFeatureV2Args;
import static com.pulumi.codegen.internal.Serialization.*;
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");
var feat = new ApigwGatewayFeatureV2("feat", ApigwGatewayFeatureV2Args.builder()
.gatewayId(gatewayId)
.enabled(true)
.config(serializeJson(
jsonObject(
jsonProperty("api_limits", 300)
)))
.build());
}
}
configuration:
gatewayId:
type: dynamic
resources:
feat:
type: opentelekomcloud:ApigwGatewayFeatureV2
properties:
gatewayId: ${gatewayId}
enabled: true
config:
fn::toJSON:
api_limits: 300
Create ApigwGatewayFeatureV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ApigwGatewayFeatureV2(name: string, args: ApigwGatewayFeatureV2Args, opts?: CustomResourceOptions);
@overload
def ApigwGatewayFeatureV2(resource_name: str,
args: ApigwGatewayFeatureV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def ApigwGatewayFeatureV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
gateway_id: Optional[str] = None,
apigw_gateway_feature_v2_id: Optional[str] = None,
config: Optional[str] = None,
enabled: Optional[bool] = None,
name: Optional[str] = None,
timeouts: Optional[ApigwGatewayFeatureV2TimeoutsArgs] = None)
func NewApigwGatewayFeatureV2(ctx *Context, name string, args ApigwGatewayFeatureV2Args, opts ...ResourceOption) (*ApigwGatewayFeatureV2, error)
public ApigwGatewayFeatureV2(string name, ApigwGatewayFeatureV2Args args, CustomResourceOptions? opts = null)
public ApigwGatewayFeatureV2(String name, ApigwGatewayFeatureV2Args args)
public ApigwGatewayFeatureV2(String name, ApigwGatewayFeatureV2Args args, CustomResourceOptions options)
type: opentelekomcloud:ApigwGatewayFeatureV2
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 ApigwGatewayFeatureV2Args
- 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 ApigwGatewayFeatureV2Args
- 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 ApigwGatewayFeatureV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApigwGatewayFeatureV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApigwGatewayFeatureV2Args
- 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 apigwGatewayFeatureV2Resource = new Opentelekomcloud.ApigwGatewayFeatureV2("apigwGatewayFeatureV2Resource", new()
{
GatewayId = "string",
ApigwGatewayFeatureV2Id = "string",
Config = "string",
Enabled = false,
Name = "string",
Timeouts = new Opentelekomcloud.Inputs.ApigwGatewayFeatureV2TimeoutsArgs
{
Create = "string",
},
});
example, err := opentelekomcloud.NewApigwGatewayFeatureV2(ctx, "apigwGatewayFeatureV2Resource", &opentelekomcloud.ApigwGatewayFeatureV2Args{
GatewayId: pulumi.String("string"),
ApigwGatewayFeatureV2Id: pulumi.String("string"),
Config: pulumi.String("string"),
Enabled: pulumi.Bool(false),
Name: pulumi.String("string"),
Timeouts: &opentelekomcloud.ApigwGatewayFeatureV2TimeoutsArgs{
Create: pulumi.String("string"),
},
})
var apigwGatewayFeatureV2Resource = new ApigwGatewayFeatureV2("apigwGatewayFeatureV2Resource", ApigwGatewayFeatureV2Args.builder()
.gatewayId("string")
.apigwGatewayFeatureV2Id("string")
.config("string")
.enabled(false)
.name("string")
.timeouts(ApigwGatewayFeatureV2TimeoutsArgs.builder()
.create("string")
.build())
.build());
apigw_gateway_feature_v2_resource = opentelekomcloud.ApigwGatewayFeatureV2("apigwGatewayFeatureV2Resource",
gateway_id="string",
apigw_gateway_feature_v2_id="string",
config="string",
enabled=False,
name="string",
timeouts={
"create": "string",
})
const apigwGatewayFeatureV2Resource = new opentelekomcloud.ApigwGatewayFeatureV2("apigwGatewayFeatureV2Resource", {
gatewayId: "string",
apigwGatewayFeatureV2Id: "string",
config: "string",
enabled: false,
name: "string",
timeouts: {
create: "string",
},
});
type: opentelekomcloud:ApigwGatewayFeatureV2
properties:
apigwGatewayFeatureV2Id: string
config: string
enabled: false
gatewayId: string
name: string
timeouts:
create: string
ApigwGatewayFeatureV2 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 ApigwGatewayFeatureV2 resource accepts the following input properties:
- Gateway
Id string - Specified the ID of the dedicated gateway to which the feature belongs. Changing this creates a new resource.
- Apigw
Gateway stringFeature V2Id - The resource ID. The value is the feature name.
- Config string
- Specified the detailed configuration of the feature.
- Enabled bool
- Specified whether to enable the feature. Default value is
false
. - Name string
- Specified the name of the feature. Changing this creates a new resource.
- Timeouts
Apigw
Gateway Feature V2Timeouts
- Gateway
Id string - Specified the ID of the dedicated gateway to which the feature belongs. Changing this creates a new resource.
- Apigw
Gateway stringFeature V2Id - The resource ID. The value is the feature name.
- Config string
- Specified the detailed configuration of the feature.
- Enabled bool
- Specified whether to enable the feature. Default value is
false
. - Name string
- Specified the name of the feature. Changing this creates a new resource.
- Timeouts
Apigw
Gateway Feature V2Timeouts Args
- gateway
Id String - Specified the ID of the dedicated gateway to which the feature belongs. Changing this creates a new resource.
- apigw
Gateway StringFeature V2Id - The resource ID. The value is the feature name.
- config String
- Specified the detailed configuration of the feature.
- enabled Boolean
- Specified whether to enable the feature. Default value is
false
. - name String
- Specified the name of the feature. Changing this creates a new resource.
- timeouts
Apigw
Gateway Feature V2Timeouts
- gateway
Id string - Specified the ID of the dedicated gateway to which the feature belongs. Changing this creates a new resource.
- apigw
Gateway stringFeature V2Id - The resource ID. The value is the feature name.
- config string
- Specified the detailed configuration of the feature.
- enabled boolean
- Specified whether to enable the feature. Default value is
false
. - name string
- Specified the name of the feature. Changing this creates a new resource.
- timeouts
Apigw
Gateway Feature V2Timeouts
- gateway_
id str - Specified the ID of the dedicated gateway to which the feature belongs. Changing this creates a new resource.
- apigw_
gateway_ strfeature_ v2_ id - The resource ID. The value is the feature name.
- config str
- Specified the detailed configuration of the feature.
- enabled bool
- Specified whether to enable the feature. Default value is
false
. - name str
- Specified the name of the feature. Changing this creates a new resource.
- timeouts
Apigw
Gateway Feature V2Timeouts Args
- gateway
Id String - Specified the ID of the dedicated gateway to which the feature belongs. Changing this creates a new resource.
- apigw
Gateway StringFeature V2Id - The resource ID. The value is the feature name.
- config String
- Specified the detailed configuration of the feature.
- enabled Boolean
- Specified whether to enable the feature. Default value is
false
. - name String
- Specified the name of the feature. Changing this creates a new resource.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the ApigwGatewayFeatureV2 resource produces the following output properties:
Look up Existing ApigwGatewayFeatureV2 Resource
Get an existing ApigwGatewayFeatureV2 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?: ApigwGatewayFeatureV2State, opts?: CustomResourceOptions): ApigwGatewayFeatureV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
apigw_gateway_feature_v2_id: Optional[str] = None,
config: Optional[str] = None,
enabled: Optional[bool] = None,
gateway_id: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
timeouts: Optional[ApigwGatewayFeatureV2TimeoutsArgs] = None) -> ApigwGatewayFeatureV2
func GetApigwGatewayFeatureV2(ctx *Context, name string, id IDInput, state *ApigwGatewayFeatureV2State, opts ...ResourceOption) (*ApigwGatewayFeatureV2, error)
public static ApigwGatewayFeatureV2 Get(string name, Input<string> id, ApigwGatewayFeatureV2State? state, CustomResourceOptions? opts = null)
public static ApigwGatewayFeatureV2 get(String name, Output<String> id, ApigwGatewayFeatureV2State state, CustomResourceOptions options)
resources: _: type: opentelekomcloud:ApigwGatewayFeatureV2 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
Gateway stringFeature V2Id - The resource ID. The value is the feature name.
- Config string
- Specified the detailed configuration of the feature.
- Enabled bool
- Specified whether to enable the feature. Default value is
false
. - Gateway
Id string - Specified the ID of the dedicated gateway to which the feature belongs. Changing this creates a new resource.
- Name string
- Specified the name of the feature. Changing this creates a new resource.
- Region string
- The region in which to create the resource.
- Timeouts
Apigw
Gateway Feature V2Timeouts
- Apigw
Gateway stringFeature V2Id - The resource ID. The value is the feature name.
- Config string
- Specified the detailed configuration of the feature.
- Enabled bool
- Specified whether to enable the feature. Default value is
false
. - Gateway
Id string - Specified the ID of the dedicated gateway to which the feature belongs. Changing this creates a new resource.
- Name string
- Specified the name of the feature. Changing this creates a new resource.
- Region string
- The region in which to create the resource.
- Timeouts
Apigw
Gateway Feature V2Timeouts Args
- apigw
Gateway StringFeature V2Id - The resource ID. The value is the feature name.
- config String
- Specified the detailed configuration of the feature.
- enabled Boolean
- Specified whether to enable the feature. Default value is
false
. - gateway
Id String - Specified the ID of the dedicated gateway to which the feature belongs. Changing this creates a new resource.
- name String
- Specified the name of the feature. Changing this creates a new resource.
- region String
- The region in which to create the resource.
- timeouts
Apigw
Gateway Feature V2Timeouts
- apigw
Gateway stringFeature V2Id - The resource ID. The value is the feature name.
- config string
- Specified the detailed configuration of the feature.
- enabled boolean
- Specified whether to enable the feature. Default value is
false
. - gateway
Id string - Specified the ID of the dedicated gateway to which the feature belongs. Changing this creates a new resource.
- name string
- Specified the name of the feature. Changing this creates a new resource.
- region string
- The region in which to create the resource.
- timeouts
Apigw
Gateway Feature V2Timeouts
- apigw_
gateway_ strfeature_ v2_ id - The resource ID. The value is the feature name.
- config str
- Specified the detailed configuration of the feature.
- enabled bool
- Specified whether to enable the feature. Default value is
false
. - gateway_
id str - Specified the ID of the dedicated gateway to which the feature belongs. Changing this creates a new resource.
- name str
- Specified the name of the feature. Changing this creates a new resource.
- region str
- The region in which to create the resource.
- timeouts
Apigw
Gateway Feature V2Timeouts Args
- apigw
Gateway StringFeature V2Id - The resource ID. The value is the feature name.
- config String
- Specified the detailed configuration of the feature.
- enabled Boolean
- Specified whether to enable the feature. Default value is
false
. - gateway
Id String - Specified the ID of the dedicated gateway to which the feature belongs. Changing this creates a new resource.
- name String
- Specified the name of the feature. Changing this creates a new resource.
- region String
- The region in which to create the resource.
- timeouts Property Map
Supporting Types
ApigwGatewayFeatureV2Timeouts, ApigwGatewayFeatureV2TimeoutsArgs
- Create string
- Create string
- create String
- create string
- create str
- create String
Import
The resource can be imported using gateway_id
and name
, separated by a slash (/), e.g.
bash
$ pulumi import opentelekomcloud:index/apigwGatewayFeatureV2:ApigwGatewayFeatureV2 feat <gateway_id>/<name>
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.