@Generated(value="jsii-pacmak/1.30.0 (build adae23f)", date="2021-06-30T10:00:46.070Z") @Stability(value=Experimental) public abstract class ResourceBase extends Resource implements IResource
software.amazon.jsii.JsiiObject.InitializationModeIResource.Jsii$Default| Modifier | Constructor and Description |
|---|---|
protected |
ResourceBase(software.constructs.Construct scope,
String id) |
protected |
ResourceBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
ResourceBase(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
Method |
addCorsPreflight(CorsOptions options)
(experimental) Adds an OPTIONS method to this resource which responds to Cross-Origin Resource Sharing (CORS) preflight requests.
|
Method |
addMethod(String httpMethod)
(experimental) Defines a new method for this resource.
|
Method |
addMethod(String httpMethod,
Integration integration)
(experimental) Defines a new method for this resource.
|
Method |
addMethod(String httpMethod,
Integration integration,
MethodOptions options)
(experimental) Defines a new method for this resource.
|
ProxyResource |
addProxy()
(experimental) Adds a greedy proxy resource ("{proxy+}") and an ANY method to this route.
|
ProxyResource |
addProxy(ProxyResourceOptions options)
(experimental) Adds a greedy proxy resource ("{proxy+}") and an ANY method to this route.
|
Resource |
addResource(String pathPart)
(experimental) Defines a new child resource where this resource is the parent.
|
Resource |
addResource(String pathPart,
ResourceOptions options)
(experimental) Defines a new child resource where this resource is the parent.
|
abstract IRestApi |
getApi()
(experimental) The rest API that this resource is part of.
|
abstract CorsOptions |
getDefaultCorsPreflightOptions()
(experimental) Default options for CORS preflight OPTIONS method.
|
abstract Integration |
getDefaultIntegration()
(experimental) An integration to use as a default for all methods created within this API unless an integration is specified.
|
abstract MethodOptions |
getDefaultMethodOptions()
(experimental) Method options to use as a default for all methods created within this API unless custom options are specified.
|
abstract IResource |
getParentResource()
(experimental) The parent of this resource or undefined for the root resource.
|
abstract String |
getPath()
(experimental) The full path of this resource.
|
IResource |
getResource(String pathPart)
(experimental) Retrieves a child resource by path part.
|
abstract String |
getResourceId()
(experimental) The ID of the resource.
|
Resource |
resourceForPath(String path)
(experimental) Gets or create all resources leading up to the specified path.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected ResourceBase(software.amazon.jsii.JsiiObjectRef objRef)
protected ResourceBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
protected ResourceBase(@NotNull
software.constructs.Construct scope,
@NotNull
String id)
scope - This parameter is required.id - This parameter is required.@Stability(value=Experimental) @NotNull public Method addCorsPreflight(@NotNull CorsOptions options)
Cross-Origin Resource Sharing (CORS) is a mechanism that uses additional HTTP headers to tell browsers to give a web application running at one origin, access to selected resources from a different origin. A web application executes a cross-origin HTTP request when it requests a resource that has a different origin (domain, protocol, or port) from its own.
options - This parameter is required.https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS@Stability(value=Experimental) @NotNull public Method addMethod(@NotNull String httpMethod, @Nullable Integration integration, @Nullable MethodOptions options)
httpMethod - This parameter is required.integration - options - @Stability(value=Experimental) @NotNull public Method addMethod(@NotNull String httpMethod, @Nullable Integration integration)
httpMethod - This parameter is required.integration - @Stability(value=Experimental) @NotNull public Method addMethod(@NotNull String httpMethod)
httpMethod - This parameter is required.@Stability(value=Experimental) @NotNull public ProxyResource addProxy(@Nullable ProxyResourceOptions options)
options - @Stability(value=Experimental) @NotNull public ProxyResource addProxy()
@Stability(value=Experimental) @NotNull public Resource addResource(@NotNull String pathPart, @Nullable ResourceOptions options)
pathPart - This parameter is required.options - @Stability(value=Experimental) @NotNull public Resource addResource(@NotNull String pathPart)
pathPart - This parameter is required.@Stability(value=Experimental) @Nullable public IResource getResource(@NotNull String pathPart)
pathPart - This parameter is required.@Stability(value=Experimental) @NotNull public Resource resourceForPath(@NotNull String path)
path - This parameter is required.@Stability(value=Experimental) @NotNull public abstract IRestApi getApi()
The reason we need the RestApi object itself and not just the ID is because the model is being tracked by the top-level RestApi object for the purpose of calculating it's hash to determine the ID of the deployment. This allows us to automatically update the deployment when the model of the REST API changes.
@Stability(value=Experimental) @NotNull public abstract String getPath()
@Stability(value=Experimental) @NotNull public abstract String getResourceId()
@Stability(value=Experimental) @Nullable public abstract CorsOptions getDefaultCorsPreflightOptions()
@Stability(value=Experimental) @Nullable public abstract Integration getDefaultIntegration()
@Stability(value=Experimental) @Nullable public abstract MethodOptions getDefaultMethodOptions()
@Stability(value=Experimental) @Nullable public abstract IResource getParentResource()
Copyright © 2021. All rights reserved.