1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. ApigResponse
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

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,
    }],
});
Copy
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,
    }])
Copy
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
	})
}
Copy
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,
            },
        },
    });

});
Copy
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());

    }
}
Copy
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
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. ApigResponseArgs
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. 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 This property is required. string
The unique name of the resource.
args This property is required. ApigResponseArgs
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. ApigResponseArgs
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. 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,
        },
    },
});
Copy
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),
		},
	},
})
Copy
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());
Copy
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,
    }])
Copy
const apigResponseResource = new flexibleengine.ApigResponse("apigResponseResource", {
    groupId: "string",
    instanceId: "string",
    apigResponseId: "string",
    name: "string",
    region: "string",
    rules: [{
        body: "string",
        errorType: "string",
        statusCode: 0,
    }],
});
Copy
type: flexibleengine:ApigResponse
properties:
    apigResponseId: string
    groupId: string
    instanceId: string
    name: string
    region: string
    rules:
        - body: string
          errorType: string
          statusCode: 0
Copy

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:

GroupId This property is required. 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.
InstanceId This property is required. 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.
ApigResponseId string
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<ApigResponseRule>
Specifies the API custom response rules definition. The object structure is documented below.
GroupId This property is required. 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.
InstanceId This property is required. 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.
ApigResponseId string
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 []ApigResponseRuleArgs
Specifies the API custom response rules definition. The object structure is documented below.
groupId This property is required. 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.
instanceId This property is required. 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.
apigResponseId String
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<ApigResponseRule>
Specifies the API custom response rules definition. The object structure is documented below.
groupId This property is required. 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.
instanceId This property is required. 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.
apigResponseId string
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 ApigResponseRule[]
Specifies the API custom response rules definition. The object structure is documented below.
group_id This property is required. 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 This property is required. 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_id str
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[ApigResponseRuleArgs]
Specifies the API custom response rules definition. The object structure is documented below.
groupId This property is required. 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.
instanceId This property is required. 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.
apigResponseId String
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:

CreatedAt string
The creation time of the API custom response.
Id string
The provider-assigned unique ID for this managed resource.
UpdatedAt string
The latest update time of the API custom response.
CreatedAt string
The creation time of the API custom response.
Id string
The provider-assigned unique ID for this managed resource.
UpdatedAt string
The latest update time of the API custom response.
createdAt String
The creation time of the API custom response.
id String
The provider-assigned unique ID for this managed resource.
updatedAt String
The latest update time of the API custom response.
createdAt string
The creation time of the API custom response.
id string
The provider-assigned unique ID for this managed resource.
updatedAt string
The latest update time of the API custom response.
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.
createdAt String
The creation time of the API custom response.
id String
The provider-assigned unique ID for this managed resource.
updatedAt String
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 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:
ApigResponseId string
ID of the API custom response.
CreatedAt string
The creation time of the API custom response.
GroupId 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.
InstanceId 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<ApigResponseRule>
Specifies the API custom response rules definition. The object structure is documented below.
UpdatedAt string
The latest update time of the API custom response.
ApigResponseId string
ID of the API custom response.
CreatedAt string
The creation time of the API custom response.
GroupId 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.
InstanceId 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 []ApigResponseRuleArgs
Specifies the API custom response rules definition. The object structure is documented below.
UpdatedAt string
The latest update time of the API custom response.
apigResponseId String
ID of the API custom response.
createdAt String
The creation time of the API custom response.
groupId 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.
instanceId 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<ApigResponseRule>
Specifies the API custom response rules definition. The object structure is documented below.
updatedAt String
The latest update time of the API custom response.
apigResponseId string
ID of the API custom response.
createdAt string
The creation time of the API custom response.
groupId 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.
instanceId 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 ApigResponseRule[]
Specifies the API custom response rules definition. The object structure is documented below.
updatedAt string
The latest update time of the API custom response.
apig_response_id str
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[ApigResponseRuleArgs]
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.
apigResponseId String
ID of the API custom response.
createdAt String
The creation time of the API custom response.
groupId 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.
instanceId 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.
updatedAt String
The latest update time of the API custom response.

Supporting Types

ApigResponseRule
, ApigResponseRuleArgs

Body This property is required. string
Specifies the body template of the API response rule, e.g. {\"code\":\"$context.authorizer.frontend.code\",\"message\":\"$context.authorizer.frontend.message\"}
ErrorType This property is required. 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.
StatusCode double
Specifies the HTTP status code of the API response rule.
Body This property is required. string
Specifies the body template of the API response rule, e.g. {\"code\":\"$context.authorizer.frontend.code\",\"message\":\"$context.authorizer.frontend.message\"}
ErrorType This property is required. 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.
StatusCode float64
Specifies the HTTP status code of the API response rule.
body This property is required. String
Specifies the body template of the API response rule, e.g. {\"code\":\"$context.authorizer.frontend.code\",\"message\":\"$context.authorizer.frontend.message\"}
errorType This property is required. 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.
statusCode Double
Specifies the HTTP status code of the API response rule.
body This property is required. string
Specifies the body template of the API response rule, e.g. {\"code\":\"$context.authorizer.frontend.code\",\"message\":\"$context.authorizer.frontend.message\"}
errorType This property is required. 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.
statusCode number
Specifies the HTTP status code of the API response rule.
body This property is required. str
Specifies the body template of the API response rule, e.g. {\"code\":\"$context.authorizer.frontend.code\",\"message\":\"$context.authorizer.frontend.message\"}
error_type This property is required. 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 This property is required. String
Specifies the body template of the API response rule, e.g. {\"code\":\"$context.authorizer.frontend.code\",\"message\":\"$context.authorizer.frontend.message\"}
errorType This property is required. 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.
statusCode 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>
Copy

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.