@Generated(value="jsii-pacmak/1.47.0 (build 86d2c33)", date="2021-12-22T10:27:15.720Z") @Stability(value=Stable) public class Method extends Resource
Resource books;
User iamUser;
Method getBooks = books.addMethod("GET", new HttpIntegration("http://amazon.com"), MethodOptions.builder()
.authorizationType(AuthorizationType.IAM)
.build());
iamUser.attachInlinePolicy(Policy.Builder.create(this, "AllowBooks")
.statements(List.of(
PolicyStatement.Builder.create()
.actions(List.of("execute-api:Invoke"))
.effect(Effect.ALLOW)
.resources(List.of(getBooks.getMethodArn()))
.build()))
.build());
| Modifier and Type | Class and Description |
|---|---|
static class |
Method.Builder
A fluent builder for
Method. |
software.amazon.jsii.JsiiObject.InitializationModeIResource.Jsii$Default| Modifier | Constructor and Description |
|---|---|
|
Method(software.constructs.Construct scope,
String id,
MethodProps props) |
protected |
Method(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Method(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
IRestApi |
getApi()
The API Gateway RestApi associated with this method.
|
String |
getHttpMethod() |
String |
getMethodArn()
Returns an execute-api ARN for this method:.
|
String |
getMethodId() |
IResource |
getResource() |
String |
getTestMethodArn()
Returns an execute-api ARN for this method's "test-invoke-stage" stage.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected Method(software.amazon.jsii.JsiiObjectRef objRef)
protected Method(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public Method(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
MethodProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Stable) @NotNull public IRestApi getApi()
@Stability(value=Stable) @NotNull public String getHttpMethod()
@Stability(value=Stable) @NotNull public String getMethodArn()
arn:aws:execute-api:{region}:{account}:{restApiId}/{stage}/{method}/{path}
NOTE: {stage} will refer to the restApi.deploymentStage, which will
automatically set if auto-deploy is enabled, or can be explicitly assigned.
When not configured, {stage} will be set to '*', as a shorthand for 'all stages'.
@Stability(value=Stable) @NotNull public String getMethodId()
@Stability(value=Stable) @NotNull public IResource getResource()
@Stability(value=Stable) @NotNull public String getTestMethodArn()
This stage is used by the AWS Console UI when testing the method.
Copyright © 2021. All rights reserved.