Class ProxyResource
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.apigateway.ResourceBase
software.amazon.awscdk.services.apigateway.Resource
software.amazon.awscdk.services.apigateway.ProxyResource
- All Implemented Interfaces:
IResourceRef,IEnvironmentAware,IResource,IResource,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.121.0 (build d7af9b9)",
date="2025-12-18T18:20:04.218Z")
@Stability(Stable)
public class ProxyResource
extends Resource
Defines a {proxy+} greedy resource and an ANY method on a route.
Example:
Resource resource;
Function handler;
ProxyResource proxy = resource.addProxy(ProxyResourceOptions.builder()
.defaultIntegration(new LambdaIntegration(handler))
// "false" will require explicitly adding methods on the `proxy` resource
.anyMethod(true)
.build());
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.apigateway.IResource
IResource.Jsii$Default -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedProxyResource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedProxyResource(software.amazon.jsii.JsiiObjectRef objRef) ProxyResource(software.constructs.Construct scope, String id, ProxyResourceProps props) -
Method Summary
Modifier and TypeMethodDescriptionDefines a new method for this resource.addMethod(String httpMethod, Integration integration) Defines a new method for this resource.addMethod(String httpMethod, Integration integration, MethodOptions options) Defines a new method for this resource.Ifprops.anyMethodistrue, this will be the reference to the 'ANY' method associated with this proxy resource.Methods inherited from class software.amazon.awscdk.services.apigateway.Resource
fromResourceAttributes, getApi, getDefaultCorsPreflightOptions, getDefaultIntegration, getDefaultMethodOptions, getParentResource, getPath, getResourceIdMethods inherited from class software.amazon.awscdk.services.apigateway.ResourceBase
addCorsPreflight, addProxy, addProxy, addResource, addResource, getResource, getResourceRef, resourceForPathMethods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.awscdk.services.apigateway.IResource
getEnv, getNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
ProxyResource
protected ProxyResource(software.amazon.jsii.JsiiObjectRef objRef) -
ProxyResource
protected ProxyResource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
ProxyResource
@Stability(Stable) public ProxyResource(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ProxyResourceProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
addMethod
@Stability(Stable) @NotNull public Method addMethod(@NotNull String httpMethod, @Nullable Integration integration, @Nullable MethodOptions options) Defines a new method for this resource.- Specified by:
addMethodin interfaceIResource- Overrides:
addMethodin classResourceBase- Parameters:
httpMethod- This parameter is required.integration-options-- Returns:
- The newly created
Methodobject.
-
addMethod
@Stability(Stable) @NotNull public Method addMethod(@NotNull String httpMethod, @Nullable Integration integration) Defines a new method for this resource.- Specified by:
addMethodin interfaceIResource- Overrides:
addMethodin classResourceBase- Parameters:
httpMethod- This parameter is required.integration-- Returns:
- The newly created
Methodobject.
-
addMethod
Defines a new method for this resource.- Specified by:
addMethodin interfaceIResource- Overrides:
addMethodin classResourceBase- Parameters:
httpMethod- This parameter is required.- Returns:
- The newly created
Methodobject.
-
getAnyMethod
Ifprops.anyMethodistrue, this will be the reference to the 'ANY' method associated with this proxy resource.
-