LocationProperty Struct
The Location property specifies the location of the Amazon API Gateway API entity that the documentation applies to.
Location is a property of the AWS::ApiGateway::DocumentationPart resource.
For more information about each property, including constraints and valid values, see DocumentationPart in the Amazon API Gateway REST API Reference .
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_apigateway as apigateway } from 'aws-cdk-lib';
const locationProperty: apigateway.CfnDocumentationPart.LocationProperty = {
method: 'method',
name: 'name',
path: 'path',
statusCode: 'statusCode',
type: 'type',
};
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_apigateway as apigateway
location_property = apigateway.CfnDocumentationPart.LocationProperty(
method="method",
name="name",
path="path",
status_code="statusCode",
type="type"
)
// 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.*;
LocationProperty locationProperty = LocationProperty.builder()
.method("method")
.name("name")
.path("path")
.statusCode("statusCode")
.type("type")
.build();
// Install: dotnet add package Amazon.CDK.Lib
// 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 locationProperty = new LocationProperty {
Method = "method",
Name = "name",
Path = "path",
StatusCode = "statusCode",
Type = "type"
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
locationProperty := &LocationProperty{
Method: jsii.String("method"),
Name: jsii.String("name"),
Path: jsii.String("path"),
StatusCode: jsii.String("statusCode"),
Type: jsii.String("type"),
}
Properties
notes
It is a valid field for the API entity types of METHOD , PATH_PARAMETER , QUERY_PARAMETER , REQUEST_HEADER , REQUEST_BODY , RESPONSE , RESPONSE_HEADER , and RESPONSE_BODY . The default value is * for any method. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's method attribute must match that of the parent entity exactly.
It is a valid and required field for the API entity types of AUTHORIZER , MODEL , PATH_PARAMETER , QUERY_PARAMETER , REQUEST_HEADER , REQUEST_BODY and RESPONSE_HEADER . It is an invalid field for any other entity type.
notes
It is a valid field for the API entity types of RESOURCE , METHOD , PATH_PARAMETER , QUERY_PARAMETER , REQUEST_HEADER , REQUEST_BODY , RESPONSE , RESPONSE_HEADER , and RESPONSE_BODY . The default value is / for the root resource. When an applicable child entity inherits the content of another entity of the same type with more general specifications of the other location attributes, the child entity's path attribute must match that of the parent entity as a prefix.
statusCodeoptionalstringstatus_codeoptionalstrstatusCodeoptionalStringStatusCodeoptionalstringStatusCodeoptional*string#notes
It is a valid field for the API entity types of RESPONSE , RESPONSE_HEADER , and RESPONSE_BODY . The default value is * for any status code. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's statusCode attribute must match that of the parent entity exactly.
notes
Valid values are API , AUTHORIZER , MODEL , RESOURCE , METHOD , PATH_PARAMETER , QUERY_PARAMETER , REQUEST_HEADER , REQUEST_BODY , RESPONSE , RESPONSE_HEADER , and RESPONSE_BODY . Content inheritance does not apply to any entity of the API , AUTHORIZER , METHOD , MODEL , REQUEST_BODY , or RESOURCE type.