Class CfnMethod
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.apigateway.CfnMethod
- All Implemented Interfaces:
IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-21T06:34:02.531Z")
@Stability(Stable)
public class CfnMethod
extends CfnResource
implements IInspectable
The
AWS::ApiGateway::Method
resource creates API Gateway methods that define the parameters and body that clients must send in their requests.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.apigateway.*; CfnMethod cfnMethod = CfnMethod.Builder.create(this, "MyCfnMethod") .httpMethod("httpMethod") .resourceId("resourceId") .restApiId("restApiId") // the properties below are optional .apiKeyRequired(false) .authorizationScopes(List.of("authorizationScopes")) .authorizationType("authorizationType") .authorizerId("authorizerId") .integration(IntegrationProperty.builder() .type("type") // the properties below are optional .cacheKeyParameters(List.of("cacheKeyParameters")) .cacheNamespace("cacheNamespace") .connectionId("connectionId") .connectionType("connectionType") .contentHandling("contentHandling") .credentials("credentials") .integrationHttpMethod("integrationHttpMethod") .integrationResponses(List.of(IntegrationResponseProperty.builder() .statusCode("statusCode") // the properties below are optional .contentHandling("contentHandling") .responseParameters(Map.of( "responseParametersKey", "responseParameters")) .responseTemplates(Map.of( "responseTemplatesKey", "responseTemplates")) .selectionPattern("selectionPattern") .build())) .passthroughBehavior("passthroughBehavior") .requestParameters(Map.of( "requestParametersKey", "requestParameters")) .requestTemplates(Map.of( "requestTemplatesKey", "requestTemplates")) .timeoutInMillis(123) .uri("uri") .build()) .methodResponses(List.of(MethodResponseProperty.builder() .statusCode("statusCode") // the properties below are optional .responseModels(Map.of( "responseModelsKey", "responseModels")) .responseParameters(Map.of( "responseParametersKey", false)) .build())) .operationName("operationName") .requestModels(Map.of( "requestModelsKey", "requestModels")) .requestParameters(Map.of( "requestParametersKey", false)) .requestValidatorId("requestValidatorId") .build();
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnMethod
.static interface
Integration
is a property of the AWS::ApiGateway::Method resource that specifies information about the target backend that a method calls.static interface
IntegrationResponse
is a property of the Amazon API Gateway Method Integration property type that specifies the response that API Gateway sends after a method's backend finishes processing a request.static interface
Represents a method response of a given HTTP status code returned to the client.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnMethod
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnMethod
(software.amazon.jsii.JsiiObjectRef objRef) CfnMethod
(software.constructs.Construct scope, String id, CfnMethodProps props) -
Method Summary
Modifier and TypeMethodDescriptionA boolean flag specifying whether a valid ApiKey is required to invoke this method.A list of authorization scopes configured on the method.The method's authorization type.The identifier of an authorizer to use on this method.The method's HTTP verb.Represents anHTTP
,HTTP_PROXY
,AWS
,AWS_PROXY
, or Mock integration.Gets a method response associated with a given HTTP status code.A human-friendly operation identifier for the method.A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key).A key-value map defining required or optional method request parameters that can be accepted by API Gateway.The identifier of a RequestValidator for request validation.The Resource identifier for the MethodResponse resource.The string identifier of the associated RestApi.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setApiKeyRequired
(Boolean value) A boolean flag specifying whether a valid ApiKey is required to invoke this method.void
setApiKeyRequired
(IResolvable value) A boolean flag specifying whether a valid ApiKey is required to invoke this method.void
setAuthorizationScopes
(List<String> value) A list of authorization scopes configured on the method.void
setAuthorizationType
(String value) The method's authorization type.void
setAuthorizerId
(String value) The identifier of an authorizer to use on this method.void
setHttpMethod
(String value) The method's HTTP verb.void
setIntegration
(IResolvable value) Represents anHTTP
,HTTP_PROXY
,AWS
,AWS_PROXY
, or Mock integration.void
Represents anHTTP
,HTTP_PROXY
,AWS
,AWS_PROXY
, or Mock integration.void
setMethodResponses
(List<Object> value) Gets a method response associated with a given HTTP status code.void
setMethodResponses
(IResolvable value) Gets a method response associated with a given HTTP status code.void
setOperationName
(String value) A human-friendly operation identifier for the method.void
setRequestModels
(Map<String, String> value) A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key).void
setRequestModels
(IResolvable value) A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key).void
setRequestParameters
(Map<String, Object> value) A key-value map defining required or optional method request parameters that can be accepted by API Gateway.void
setRequestParameters
(IResolvable value) A key-value map defining required or optional method request parameters that can be accepted by API Gateway.void
setRequestValidatorId
(String value) The identifier of a RequestValidator for request validation.void
setResourceId
(String value) The Resource identifier for the MethodResponse resource.void
setRestApiId
(String value) The string identifier of the associated RestApi.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnMethod
protected CfnMethod(software.amazon.jsii.JsiiObjectRef objRef) -
CfnMethod
protected CfnMethod(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnMethod
@Stability(Stable) public CfnMethod(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnMethodProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getHttpMethod
The method's HTTP verb. -
setHttpMethod
The method's HTTP verb. -
getResourceId
The Resource identifier for the MethodResponse resource. -
setResourceId
The Resource identifier for the MethodResponse resource. -
getRestApiId
The string identifier of the associated RestApi. -
setRestApiId
The string identifier of the associated RestApi. -
getApiKeyRequired
A boolean flag specifying whether a valid ApiKey is required to invoke this method. -
setApiKeyRequired
A boolean flag specifying whether a valid ApiKey is required to invoke this method. -
setApiKeyRequired
A boolean flag specifying whether a valid ApiKey is required to invoke this method. -
getAuthorizationScopes
A list of authorization scopes configured on the method. -
setAuthorizationScopes
A list of authorization scopes configured on the method. -
getAuthorizationType
The method's authorization type. -
setAuthorizationType
The method's authorization type. -
getAuthorizerId
The identifier of an authorizer to use on this method. -
setAuthorizerId
The identifier of an authorizer to use on this method. -
getIntegration
Represents anHTTP
,HTTP_PROXY
,AWS
,AWS_PROXY
, or Mock integration. -
setIntegration
Represents anHTTP
,HTTP_PROXY
,AWS
,AWS_PROXY
, or Mock integration. -
setIntegration
Represents anHTTP
,HTTP_PROXY
,AWS
,AWS_PROXY
, or Mock integration. -
getMethodResponses
Gets a method response associated with a given HTTP status code. -
setMethodResponses
Gets a method response associated with a given HTTP status code. -
setMethodResponses
Gets a method response associated with a given HTTP status code. -
getOperationName
A human-friendly operation identifier for the method. -
setOperationName
A human-friendly operation identifier for the method. -
getRequestModels
A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key). -
setRequestModels
A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key). -
setRequestModels
A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key). -
getRequestParameters
A key-value map defining required or optional method request parameters that can be accepted by API Gateway. -
setRequestParameters
A key-value map defining required or optional method request parameters that can be accepted by API Gateway. -
setRequestParameters
A key-value map defining required or optional method request parameters that can be accepted by API Gateway. -
getRequestValidatorId
The identifier of a RequestValidator for request validation. -
setRequestValidatorId
The identifier of a RequestValidator for request validation.
-