Class CfnMethod
The AWS::ApiGateway::Method
resource creates API Gateway methods that define the parameters and body that clients must send in their requests.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnMethod : CfnResource, IInspectable
Syntax (vb)
Public Class CfnMethod
Inherits CfnResource
Implements IInspectable
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html
CloudformationResource: AWS::ApiGateway::Method
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.APIGateway;
var cfnMethod = new CfnMethod(this, "MyCfnMethod", new CfnMethodProps {
HttpMethod = "httpMethod",
ResourceId = "resourceId",
RestApiId = "restApiId",
// the properties below are optional
ApiKeyRequired = false,
AuthorizationScopes = new [] { "authorizationScopes" },
AuthorizationType = "authorizationType",
AuthorizerId = "authorizerId",
Integration = new IntegrationProperty {
Type = "type",
// the properties below are optional
CacheKeyParameters = new [] { "cacheKeyParameters" },
CacheNamespace = "cacheNamespace",
ConnectionId = "connectionId",
ConnectionType = "connectionType",
ContentHandling = "contentHandling",
Credentials = "credentials",
IntegrationHttpMethod = "integrationHttpMethod",
IntegrationResponses = new [] { new IntegrationResponseProperty {
StatusCode = "statusCode",
// the properties below are optional
ContentHandling = "contentHandling",
ResponseParameters = new Dictionary<string, string> {
{ "responseParametersKey", "responseParameters" }
},
ResponseTemplates = new Dictionary<string, string> {
{ "responseTemplatesKey", "responseTemplates" }
},
SelectionPattern = "selectionPattern"
} },
PassthroughBehavior = "passthroughBehavior",
RequestParameters = new Dictionary<string, string> {
{ "requestParametersKey", "requestParameters" }
},
RequestTemplates = new Dictionary<string, string> {
{ "requestTemplatesKey", "requestTemplates" }
},
TimeoutInMillis = 123,
Uri = "uri"
},
MethodResponses = new [] { new MethodResponseProperty {
StatusCode = "statusCode",
// the properties below are optional
ResponseModels = new Dictionary<string, string> {
{ "responseModelsKey", "responseModels" }
},
ResponseParameters = new Dictionary<string, object> {
{ "responseParametersKey", false }
}
} },
OperationName = "operationName",
RequestModels = new Dictionary<string, string> {
{ "requestModelsKey", "requestModels" }
},
RequestParameters = new Dictionary<string, object> {
{ "requestParametersKey", false }
},
RequestValidatorId = "requestValidatorId"
});
Synopsis
Constructors
CfnMethod(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnMethod(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnMethod(Construct, String, ICfnMethodProps) |
Properties
ApiKeyRequired | A boolean flag specifying whether a valid ApiKey is required to invoke this method. |
AuthorizationScopes | A list of authorization scopes configured on the method. |
AuthorizationType | The method's authorization type. |
AuthorizerId | The identifier of an authorizer to use on this method. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
HttpMethod | The method's HTTP verb. |
Integration | Represents an |
MethodResponses | Gets a method response associated with a given HTTP status code. |
OperationName | A human-friendly operation identifier for the method. |
RequestModels | 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). |
RequestParameters | A key-value map defining required or optional method request parameters that can be accepted by API Gateway. |
RequestValidatorId | The identifier of a RequestValidator for request validation. |
ResourceId | The Resource identifier for the MethodResponse resource. |
RestApiId | The string identifier of the associated RestApi. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnMethod(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnMethod(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnMethod(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnMethod(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnMethod(Construct, String, ICfnMethodProps)
public CfnMethod(Construct scope, string id, ICfnMethodProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnMethodProps
Resource properties.
Properties
ApiKeyRequired
A boolean flag specifying whether a valid ApiKey is required to invoke this method.
public virtual object ApiKeyRequired { get; set; }
Property Value
System.Object
AuthorizationScopes
A list of authorization scopes configured on the method.
public virtual string[] AuthorizationScopes { get; set; }
Property Value
System.String[]
AuthorizationType
The method's authorization type.
public virtual string AuthorizationType { get; set; }
Property Value
System.String
AuthorizerId
The identifier of an authorizer to use on this method.
public virtual string AuthorizerId { get; set; }
Property Value
System.String
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
HttpMethod
The method's HTTP verb.
public virtual string HttpMethod { get; set; }
Property Value
System.String
Integration
Represents an HTTP
, HTTP_PROXY
, AWS
, AWS_PROXY
, or Mock integration.
public virtual object Integration { get; set; }
Property Value
System.Object
MethodResponses
Gets a method response associated with a given HTTP status code.
public virtual object MethodResponses { get; set; }
Property Value
System.Object
OperationName
A human-friendly operation identifier for the method.
public virtual string OperationName { get; set; }
Property Value
System.String
RequestModels
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).
public virtual object RequestModels { get; set; }
Property Value
System.Object
RequestParameters
A key-value map defining required or optional method request parameters that can be accepted by API Gateway.
public virtual object RequestParameters { get; set; }
Property Value
System.Object
RequestValidatorId
The identifier of a RequestValidator for request validation.
public virtual string RequestValidatorId { get; set; }
Property Value
System.String
ResourceId
The Resource identifier for the MethodResponse resource.
public virtual string ResourceId { get; set; }
Property Value
System.String
RestApiId
The string identifier of the associated RestApi.
public virtual string RestApiId { get; set; }
Property Value
System.String
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>