flexibleengine.ApigResponse
Explore with Pulumi AI
Manages an APIG (API) custom response resource 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 groupId = config.requireObject("groupId");
const responseName = config.requireObject("responseName");
const test = new flexibleengine.ApigResponse("test", {
instanceId: instanceId,
groupId: groupId,
rules: [{
errorType: "AUTHORIZER_FAILURE",
body: "{\"code\":\"$context.authorizer.frontend.code\",\"message\":\"$context.authorizer.frontend.message\"}",
statusCode: 401,
}],
});
import pulumi
import pulumi_flexibleengine as flexibleengine
config = pulumi.Config()
instance_id = config.require_object("instanceId")
group_id = config.require_object("groupId")
response_name = config.require_object("responseName")
test = flexibleengine.ApigResponse("test",
instance_id=instance_id,
group_id=group_id,
rules=[{
"error_type": "AUTHORIZER_FAILURE",
"body": "{\"code\":\"$context.authorizer.frontend.code\",\"message\":\"$context.authorizer.frontend.message\"}",
"status_code": 401,
}])
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")
groupId := cfg.RequireObject("groupId")
responseName := cfg.RequireObject("responseName")
_, err := flexibleengine.NewApigResponse(ctx, "test", &flexibleengine.ApigResponseArgs{
InstanceId: pulumi.Any(instanceId),
GroupId: pulumi.Any(groupId),
Rules: flexibleengine.ApigResponseRuleArray{
&flexibleengine.ApigResponseRuleArgs{
ErrorType: pulumi.String("AUTHORIZER_FAILURE"),
Body: pulumi.String("{\"code\":\"$context.authorizer.frontend.code\",\"message\":\"$context.authorizer.frontend.message\"}"),
StatusCode: pulumi.Float64(401),
},
},
})
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 groupId = config.RequireObject<dynamic>("groupId");
var responseName = config.RequireObject<dynamic>("responseName");
var test = new Flexibleengine.ApigResponse("test", new()
{
InstanceId = instanceId,
GroupId = groupId,
Rules = new[]
{
new Flexibleengine.Inputs.ApigResponseRuleArgs
{
ErrorType = "AUTHORIZER_FAILURE",
Body = "{\"code\":\"$context.authorizer.frontend.code\",\"message\":\"$context.authorizer.frontend.message\"}",
StatusCode = 401,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.ApigResponse;
import com.pulumi.flexibleengine.ApigResponseArgs;
import com.pulumi.flexibleengine.inputs.ApigResponseRuleArgs;
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 groupId = config.get("groupId");
final var responseName = config.get("responseName");
var test = new ApigResponse("test", ApigResponseArgs.builder()
.instanceId(instanceId)
.groupId(groupId)
.rules(ApigResponseRuleArgs.builder()
.errorType("AUTHORIZER_FAILURE")
.body("{\"code\":\"$context.authorizer.frontend.code\",\"message\":\"$context.authorizer.frontend.message\"}")
.statusCode(401)
.build())
.build());
}
}
configuration:
instanceId:
type: dynamic
groupId:
type: dynamic
responseName:
type: dynamic
resources:
test:
type: flexibleengine:ApigResponse
properties:
instanceId: ${instanceId}
groupId: ${groupId}
rules:
- errorType: AUTHORIZER_FAILURE
body: '{"code":"$context.authorizer.frontend.code","message":"$context.authorizer.frontend.message"}'
statusCode: 401
Create ApigResponse Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ApigResponse(name: string, args: ApigResponseArgs, opts?: CustomResourceOptions);
@overload
def ApigResponse(resource_name: str,
args: ApigResponseArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ApigResponse(resource_name: str,
opts: Optional[ResourceOptions] = None,
group_id: Optional[str] = None,
instance_id: Optional[str] = None,
apig_response_id: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
rules: Optional[Sequence[ApigResponseRuleArgs]] = None)
func NewApigResponse(ctx *Context, name string, args ApigResponseArgs, opts ...ResourceOption) (*ApigResponse, error)
public ApigResponse(string name, ApigResponseArgs args, CustomResourceOptions? opts = null)
public ApigResponse(String name, ApigResponseArgs args)
public ApigResponse(String name, ApigResponseArgs args, CustomResourceOptions options)
type: flexibleengine:ApigResponse
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 ApigResponseArgs
- 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 ApigResponseArgs
- 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 ApigResponseArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApigResponseArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApigResponseArgs
- 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 apigResponseResource = new Flexibleengine.ApigResponse("apigResponseResource", new()
{
GroupId = "string",
InstanceId = "string",
ApigResponseId = "string",
Name = "string",
Region = "string",
Rules = new[]
{
new Flexibleengine.Inputs.ApigResponseRuleArgs
{
Body = "string",
ErrorType = "string",
StatusCode = 0,
},
},
});
example, err := flexibleengine.NewApigResponse(ctx, "apigResponseResource", &flexibleengine.ApigResponseArgs{
GroupId: pulumi.String("string"),
InstanceId: pulumi.String("string"),
ApigResponseId: pulumi.String("string"),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
Rules: flexibleengine.ApigResponseRuleArray{
&flexibleengine.ApigResponseRuleArgs{
Body: pulumi.String("string"),
ErrorType: pulumi.String("string"),
StatusCode: pulumi.Float64(0),
},
},
})
var apigResponseResource = new ApigResponse("apigResponseResource", ApigResponseArgs.builder()
.groupId("string")
.instanceId("string")
.apigResponseId("string")
.name("string")
.region("string")
.rules(ApigResponseRuleArgs.builder()
.body("string")
.errorType("string")
.statusCode(0)
.build())
.build());
apig_response_resource = flexibleengine.ApigResponse("apigResponseResource",
group_id="string",
instance_id="string",
apig_response_id="string",
name="string",
region="string",
rules=[{
"body": "string",
"error_type": "string",
"status_code": 0,
}])
const apigResponseResource = new flexibleengine.ApigResponse("apigResponseResource", {
groupId: "string",
instanceId: "string",
apigResponseId: "string",
name: "string",
region: "string",
rules: [{
body: "string",
errorType: "string",
statusCode: 0,
}],
});
type: flexibleengine:ApigResponse
properties:
apigResponseId: string
groupId: string
instanceId: string
name: string
region: string
rules:
- body: string
errorType: string
statusCode: 0
ApigResponse 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 ApigResponse resource accepts the following input properties:
- Group
Id string - Specifies the ID of the API group to which the API response belongs to. Changing this will create a new API custom response resource.
- Instance
Id string - Specifies the ID of the APIG dedicated instance to which the API group where the API custom response belongs. Changing this will create a new API custom response resource.
- Apig
Response stringId - ID of the API custom response.
- Name string
- Specifies the name of the API custom response. The name consists of 1 to 64 characters, and only letters, digits, hyphens(-), and underscores (_) are allowed.
- Region string
- Specifies the region in which to create the API custom response resource. If omitted, the provider-level region will be used. Changing this will create a new API custom response resource.
- Rules
List<Apig
Response Rule> - Specifies the API custom response rules definition. The object structure is documented below.
- Group
Id string - Specifies the ID of the API group to which the API response belongs to. Changing this will create a new API custom response resource.
- Instance
Id string - Specifies the ID of the APIG dedicated instance to which the API group where the API custom response belongs. Changing this will create a new API custom response resource.
- Apig
Response stringId - ID of the API custom response.
- Name string
- Specifies the name of the API custom response. The name consists of 1 to 64 characters, and only letters, digits, hyphens(-), and underscores (_) are allowed.
- Region string
- Specifies the region in which to create the API custom response resource. If omitted, the provider-level region will be used. Changing this will create a new API custom response resource.
- Rules
[]Apig
Response Rule Args - Specifies the API custom response rules definition. The object structure is documented below.
- group
Id String - Specifies the ID of the API group to which the API response belongs to. Changing this will create a new API custom response resource.
- instance
Id String - Specifies the ID of the APIG dedicated instance to which the API group where the API custom response belongs. Changing this will create a new API custom response resource.
- apig
Response StringId - ID of the API custom response.
- name String
- Specifies the name of the API custom response. The name consists of 1 to 64 characters, and only letters, digits, hyphens(-), and underscores (_) are allowed.
- region String
- Specifies the region in which to create the API custom response resource. If omitted, the provider-level region will be used. Changing this will create a new API custom response resource.
- rules
List<Apig
Response Rule> - Specifies the API custom response rules definition. The object structure is documented below.
- group
Id string - Specifies the ID of the API group to which the API response belongs to. Changing this will create a new API custom response resource.
- instance
Id string - Specifies the ID of the APIG dedicated instance to which the API group where the API custom response belongs. Changing this will create a new API custom response resource.
- apig
Response stringId - ID of the API custom response.
- name string
- Specifies the name of the API custom response. The name consists of 1 to 64 characters, and only letters, digits, hyphens(-), and underscores (_) are allowed.
- region string
- Specifies the region in which to create the API custom response resource. If omitted, the provider-level region will be used. Changing this will create a new API custom response resource.
- rules
Apig
Response Rule[] - Specifies the API custom response rules definition. The object structure is documented below.
- group_
id str - Specifies the ID of the API group to which the API response belongs to. Changing this will create a new API custom response resource.
- instance_
id str - Specifies the ID of the APIG dedicated instance to which the API group where the API custom response belongs. Changing this will create a new API custom response resource.
- apig_
response_ strid - ID of the API custom response.
- name str
- Specifies the name of the API custom response. The name consists of 1 to 64 characters, and only letters, digits, hyphens(-), and underscores (_) are allowed.
- region str
- Specifies the region in which to create the API custom response resource. If omitted, the provider-level region will be used. Changing this will create a new API custom response resource.
- rules
Sequence[Apig
Response Rule Args] - Specifies the API custom response rules definition. The object structure is documented below.
- group
Id String - Specifies the ID of the API group to which the API response belongs to. Changing this will create a new API custom response resource.
- instance
Id String - Specifies the ID of the APIG dedicated instance to which the API group where the API custom response belongs. Changing this will create a new API custom response resource.
- apig
Response StringId - ID of the API custom response.
- name String
- Specifies the name of the API custom response. The name consists of 1 to 64 characters, and only letters, digits, hyphens(-), and underscores (_) are allowed.
- region String
- Specifies the region in which to create the API custom response resource. If omitted, the provider-level region will be used. Changing this will create a new API custom response resource.
- rules List<Property Map>
- Specifies the API custom response rules definition. The object structure is documented below.
Outputs
All input properties are implicitly available as output properties. Additionally, the ApigResponse resource produces the following output properties:
- created_
at str - The creation time of the API custom response.
- id str
- The provider-assigned unique ID for this managed resource.
- updated_
at str - The latest update time of the API custom response.
Look up Existing ApigResponse Resource
Get an existing ApigResponse 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?: ApigResponseState, opts?: CustomResourceOptions): ApigResponse
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
apig_response_id: Optional[str] = None,
created_at: Optional[str] = None,
group_id: Optional[str] = None,
instance_id: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
rules: Optional[Sequence[ApigResponseRuleArgs]] = None,
updated_at: Optional[str] = None) -> ApigResponse
func GetApigResponse(ctx *Context, name string, id IDInput, state *ApigResponseState, opts ...ResourceOption) (*ApigResponse, error)
public static ApigResponse Get(string name, Input<string> id, ApigResponseState? state, CustomResourceOptions? opts = null)
public static ApigResponse get(String name, Output<String> id, ApigResponseState state, CustomResourceOptions options)
resources: _: type: flexibleengine:ApigResponse 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
Response stringId - ID of the API custom response.
- Created
At string - The creation time of the API custom response.
- Group
Id string - Specifies the ID of the API group to which the API response belongs to. Changing this will create a new API custom response resource.
- Instance
Id string - Specifies the ID of the APIG dedicated instance to which the API group where the API custom response belongs. Changing this will create a new API custom response resource.
- Name string
- Specifies the name of the API custom response. The name consists of 1 to 64 characters, and only letters, digits, hyphens(-), and underscores (_) are allowed.
- Region string
- Specifies the region in which to create the API custom response resource. If omitted, the provider-level region will be used. Changing this will create a new API custom response resource.
- Rules
List<Apig
Response Rule> - Specifies the API custom response rules definition. The object structure is documented below.
- Updated
At string - The latest update time of the API custom response.
- Apig
Response stringId - ID of the API custom response.
- Created
At string - The creation time of the API custom response.
- Group
Id string - Specifies the ID of the API group to which the API response belongs to. Changing this will create a new API custom response resource.
- Instance
Id string - Specifies the ID of the APIG dedicated instance to which the API group where the API custom response belongs. Changing this will create a new API custom response resource.
- Name string
- Specifies the name of the API custom response. The name consists of 1 to 64 characters, and only letters, digits, hyphens(-), and underscores (_) are allowed.
- Region string
- Specifies the region in which to create the API custom response resource. If omitted, the provider-level region will be used. Changing this will create a new API custom response resource.
- Rules
[]Apig
Response Rule Args - Specifies the API custom response rules definition. The object structure is documented below.
- Updated
At string - The latest update time of the API custom response.
- apig
Response StringId - ID of the API custom response.
- created
At String - The creation time of the API custom response.
- group
Id String - Specifies the ID of the API group to which the API response belongs to. Changing this will create a new API custom response resource.
- instance
Id String - Specifies the ID of the APIG dedicated instance to which the API group where the API custom response belongs. Changing this will create a new API custom response resource.
- name String
- Specifies the name of the API custom response. The name consists of 1 to 64 characters, and only letters, digits, hyphens(-), and underscores (_) are allowed.
- region String
- Specifies the region in which to create the API custom response resource. If omitted, the provider-level region will be used. Changing this will create a new API custom response resource.
- rules
List<Apig
Response Rule> - Specifies the API custom response rules definition. The object structure is documented below.
- updated
At String - The latest update time of the API custom response.
- apig
Response stringId - ID of the API custom response.
- created
At string - The creation time of the API custom response.
- group
Id string - Specifies the ID of the API group to which the API response belongs to. Changing this will create a new API custom response resource.
- instance
Id string - Specifies the ID of the APIG dedicated instance to which the API group where the API custom response belongs. Changing this will create a new API custom response resource.
- name string
- Specifies the name of the API custom response. The name consists of 1 to 64 characters, and only letters, digits, hyphens(-), and underscores (_) are allowed.
- region string
- Specifies the region in which to create the API custom response resource. If omitted, the provider-level region will be used. Changing this will create a new API custom response resource.
- rules
Apig
Response Rule[] - Specifies the API custom response rules definition. The object structure is documented below.
- updated
At string - The latest update time of the API custom response.
- apig_
response_ strid - ID of the API custom response.
- created_
at str - The creation time of the API custom response.
- group_
id str - Specifies the ID of the API group to which the API response belongs to. Changing this will create a new API custom response resource.
- instance_
id str - Specifies the ID of the APIG dedicated instance to which the API group where the API custom response belongs. Changing this will create a new API custom response resource.
- name str
- Specifies the name of the API custom response. The name consists of 1 to 64 characters, and only letters, digits, hyphens(-), and underscores (_) are allowed.
- region str
- Specifies the region in which to create the API custom response resource. If omitted, the provider-level region will be used. Changing this will create a new API custom response resource.
- rules
Sequence[Apig
Response Rule Args] - Specifies the API custom response rules definition. The object structure is documented below.
- updated_
at str - The latest update time of the API custom response.
- apig
Response StringId - ID of the API custom response.
- created
At String - The creation time of the API custom response.
- group
Id String - Specifies the ID of the API group to which the API response belongs to. Changing this will create a new API custom response resource.
- instance
Id String - Specifies the ID of the APIG dedicated instance to which the API group where the API custom response belongs. Changing this will create a new API custom response resource.
- name String
- Specifies the name of the API custom response. The name consists of 1 to 64 characters, and only letters, digits, hyphens(-), and underscores (_) are allowed.
- region String
- Specifies the region in which to create the API custom response resource. If omitted, the provider-level region will be used. Changing this will create a new API custom response resource.
- rules List<Property Map>
- Specifies the API custom response rules definition. The object structure is documented below.
- updated
At String - The latest update time of the API custom response.
Supporting Types
ApigResponseRule, ApigResponseRuleArgs
- Body string
- Specifies the body template of the API response rule, e.g.
{\"code\":\"$context.authorizer.frontend.code\",\"message\":\"$context.authorizer.frontend.message\"}
- Error
Type string - Specifies the type of the API custom response rule.
- AUTH_FAILURE: Authentication failed.
- AUTH_HEADER_MISSING: The identity source is missing.
- AUTHORIZER_FAILURE: Custom authentication failed.
- AUTHORIZER_CONF_FAILURE: There has been a custom authorizer error.
- AUTHORIZER_IDENTITIES_FAILURE: The identity source of the custom authorizer is invalid.
- BACKEND_UNAVAILABLE: The backend service is unavailable.
- BACKEND_TIMEOUT: Communication with the backend service timed out.
- THROTTLED: The request was rejected due to request throttling.
- UNAUTHORIZED: The app you are using has not been authorized to call the API.
- ACCESS_DENIED: Access denied.
- NOT_FOUND: No API is found.
- REQUEST_PARAMETERS_FAILURE: The request parameters are incorrect.
- DEFAULT_4XX: Another 4XX error occurred.
- DEFAULT_5XX: Another 5XX error occurred.
- Status
Code double - Specifies the HTTP status code of the API response rule.
- Body string
- Specifies the body template of the API response rule, e.g.
{\"code\":\"$context.authorizer.frontend.code\",\"message\":\"$context.authorizer.frontend.message\"}
- Error
Type string - Specifies the type of the API custom response rule.
- AUTH_FAILURE: Authentication failed.
- AUTH_HEADER_MISSING: The identity source is missing.
- AUTHORIZER_FAILURE: Custom authentication failed.
- AUTHORIZER_CONF_FAILURE: There has been a custom authorizer error.
- AUTHORIZER_IDENTITIES_FAILURE: The identity source of the custom authorizer is invalid.
- BACKEND_UNAVAILABLE: The backend service is unavailable.
- BACKEND_TIMEOUT: Communication with the backend service timed out.
- THROTTLED: The request was rejected due to request throttling.
- UNAUTHORIZED: The app you are using has not been authorized to call the API.
- ACCESS_DENIED: Access denied.
- NOT_FOUND: No API is found.
- REQUEST_PARAMETERS_FAILURE: The request parameters are incorrect.
- DEFAULT_4XX: Another 4XX error occurred.
- DEFAULT_5XX: Another 5XX error occurred.
- Status
Code float64 - Specifies the HTTP status code of the API response rule.
- body String
- Specifies the body template of the API response rule, e.g.
{\"code\":\"$context.authorizer.frontend.code\",\"message\":\"$context.authorizer.frontend.message\"}
- error
Type String - Specifies the type of the API custom response rule.
- AUTH_FAILURE: Authentication failed.
- AUTH_HEADER_MISSING: The identity source is missing.
- AUTHORIZER_FAILURE: Custom authentication failed.
- AUTHORIZER_CONF_FAILURE: There has been a custom authorizer error.
- AUTHORIZER_IDENTITIES_FAILURE: The identity source of the custom authorizer is invalid.
- BACKEND_UNAVAILABLE: The backend service is unavailable.
- BACKEND_TIMEOUT: Communication with the backend service timed out.
- THROTTLED: The request was rejected due to request throttling.
- UNAUTHORIZED: The app you are using has not been authorized to call the API.
- ACCESS_DENIED: Access denied.
- NOT_FOUND: No API is found.
- REQUEST_PARAMETERS_FAILURE: The request parameters are incorrect.
- DEFAULT_4XX: Another 4XX error occurred.
- DEFAULT_5XX: Another 5XX error occurred.
- status
Code Double - Specifies the HTTP status code of the API response rule.
- body string
- Specifies the body template of the API response rule, e.g.
{\"code\":\"$context.authorizer.frontend.code\",\"message\":\"$context.authorizer.frontend.message\"}
- error
Type string - Specifies the type of the API custom response rule.
- AUTH_FAILURE: Authentication failed.
- AUTH_HEADER_MISSING: The identity source is missing.
- AUTHORIZER_FAILURE: Custom authentication failed.
- AUTHORIZER_CONF_FAILURE: There has been a custom authorizer error.
- AUTHORIZER_IDENTITIES_FAILURE: The identity source of the custom authorizer is invalid.
- BACKEND_UNAVAILABLE: The backend service is unavailable.
- BACKEND_TIMEOUT: Communication with the backend service timed out.
- THROTTLED: The request was rejected due to request throttling.
- UNAUTHORIZED: The app you are using has not been authorized to call the API.
- ACCESS_DENIED: Access denied.
- NOT_FOUND: No API is found.
- REQUEST_PARAMETERS_FAILURE: The request parameters are incorrect.
- DEFAULT_4XX: Another 4XX error occurred.
- DEFAULT_5XX: Another 5XX error occurred.
- status
Code number - Specifies the HTTP status code of the API response rule.
- body str
- Specifies the body template of the API response rule, e.g.
{\"code\":\"$context.authorizer.frontend.code\",\"message\":\"$context.authorizer.frontend.message\"}
- error_
type str - Specifies the type of the API custom response rule.
- AUTH_FAILURE: Authentication failed.
- AUTH_HEADER_MISSING: The identity source is missing.
- AUTHORIZER_FAILURE: Custom authentication failed.
- AUTHORIZER_CONF_FAILURE: There has been a custom authorizer error.
- AUTHORIZER_IDENTITIES_FAILURE: The identity source of the custom authorizer is invalid.
- BACKEND_UNAVAILABLE: The backend service is unavailable.
- BACKEND_TIMEOUT: Communication with the backend service timed out.
- THROTTLED: The request was rejected due to request throttling.
- UNAUTHORIZED: The app you are using has not been authorized to call the API.
- ACCESS_DENIED: Access denied.
- NOT_FOUND: No API is found.
- REQUEST_PARAMETERS_FAILURE: The request parameters are incorrect.
- DEFAULT_4XX: Another 4XX error occurred.
- DEFAULT_5XX: Another 5XX error occurred.
- status_
code float - Specifies the HTTP status code of the API response rule.
- body String
- Specifies the body template of the API response rule, e.g.
{\"code\":\"$context.authorizer.frontend.code\",\"message\":\"$context.authorizer.frontend.message\"}
- error
Type String - Specifies the type of the API custom response rule.
- AUTH_FAILURE: Authentication failed.
- AUTH_HEADER_MISSING: The identity source is missing.
- AUTHORIZER_FAILURE: Custom authentication failed.
- AUTHORIZER_CONF_FAILURE: There has been a custom authorizer error.
- AUTHORIZER_IDENTITIES_FAILURE: The identity source of the custom authorizer is invalid.
- BACKEND_UNAVAILABLE: The backend service is unavailable.
- BACKEND_TIMEOUT: Communication with the backend service timed out.
- THROTTLED: The request was rejected due to request throttling.
- UNAUTHORIZED: The app you are using has not been authorized to call the API.
- ACCESS_DENIED: Access denied.
- NOT_FOUND: No API is found.
- REQUEST_PARAMETERS_FAILURE: The request parameters are incorrect.
- DEFAULT_4XX: Another 4XX error occurred.
- DEFAULT_5XX: Another 5XX error occurred.
- status
Code Number - Specifies the HTTP status code of the API response rule.
Import
API Responses can be imported using the ID of the APIG dedicated instances and API groups to which the API
response belongs and API Response name
, separated by a slash, e.g.
$ pulumi import flexibleengine:index/apigResponse:ApigResponse test <instance_id>/<group_id>/<name>
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.