agent-claw: automated task changes
This commit is contained in:
73
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/aws.d.ts
generated
vendored
Normal file
73
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/aws.d.ts
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
import type { IntegrationConfig, IntegrationOptions } from '../integration';
|
||||
import { Integration } from '../integration';
|
||||
import type { Method } from '../method';
|
||||
export interface AwsIntegrationProps {
|
||||
/**
|
||||
* Use AWS_PROXY integration.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly proxy?: boolean;
|
||||
/**
|
||||
* The name of the integrated AWS service (e.g. `s3`)
|
||||
*/
|
||||
readonly service: string;
|
||||
/**
|
||||
* A designated subdomain supported by certain AWS service for fast
|
||||
* host-name lookup.
|
||||
*/
|
||||
readonly subdomain?: string;
|
||||
/**
|
||||
* The path to use for path-base APIs.
|
||||
*
|
||||
* For example, for S3 GET, you can set path to `bucket/key`.
|
||||
* For lambda, you can set path to `2015-03-31/functions/${function-arn}/invocations`
|
||||
*
|
||||
* Mutually exclusive with the `action` options.
|
||||
*/
|
||||
readonly path?: string;
|
||||
/**
|
||||
* The AWS action to perform in the integration.
|
||||
*
|
||||
* Use `actionParams` to specify key-value params for the action.
|
||||
*
|
||||
* Mutually exclusive with `path`.
|
||||
*/
|
||||
readonly action?: string;
|
||||
/**
|
||||
* Parameters for the action.
|
||||
*
|
||||
* `action` must be set, and `path` must be undefined.
|
||||
* The action params will be URL encoded.
|
||||
*/
|
||||
readonly actionParameters?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
/**
|
||||
* The integration's HTTP method type.
|
||||
*
|
||||
* @default POST
|
||||
*/
|
||||
readonly integrationHttpMethod?: string;
|
||||
/**
|
||||
* Integration options, such as content handling, request/response mapping, etc.
|
||||
*/
|
||||
readonly options?: IntegrationOptions;
|
||||
/**
|
||||
* The region of the integrated AWS service.
|
||||
*
|
||||
* @default - same region as the stack
|
||||
*/
|
||||
readonly region?: string;
|
||||
}
|
||||
/**
|
||||
* This type of integration lets an API expose AWS service actions. It is
|
||||
* intended for calling all AWS service actions, but is not recommended for
|
||||
* calling a Lambda function, because the Lambda custom integration is a legacy
|
||||
* technology.
|
||||
*/
|
||||
export declare class AwsIntegration extends Integration {
|
||||
private scope?;
|
||||
constructor(props: AwsIntegrationProps);
|
||||
bind(method: Method): IntegrationConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/aws.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/aws.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AwsIntegration=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var cdk=()=>{var tmp=require("../../../core");return cdk=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},errors_1=()=>{var tmp=require("../../../core/lib/errors");return errors_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},integration_1=()=>{var tmp=require("../integration");return integration_1=()=>tmp,tmp},util_1=()=>{var tmp=require("../util");return util_1=()=>tmp,tmp};class AwsIntegration extends integration_1().Integration{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_apigateway.AwsIntegration",version:"2.252.0"};scope;constructor(props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigateway_AwsIntegrationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,AwsIntegration),error}const backend=props.subdomain?`${props.subdomain}.${props.service}`:props.service,type=props.proxy?integration_1().IntegrationType.AWS_PROXY:integration_1().IntegrationType.AWS,{apiType,apiValue}=(0,util_1().parseAwsApiCall)(props.path,props.action,props.actionParameters);super({type,integrationHttpMethod:props.integrationHttpMethod||"POST",uri:cdk().Lazy.string({produce:()=>{if(!this.scope)throw new(errors_1()).UnscopedValidationError((0,literal_string_1().lit)`MustBeAwsintegrationUsed`,"AwsIntegration must be used in API");return cdk().Stack.of(this.scope).formatArn({service:"apigateway",account:backend,resource:apiType,arnFormat:core_1().ArnFormat.SLASH_RESOURCE_NAME,resourceName:apiValue,region:props.region})}}),options:props.options})}bind(method){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigateway_Method(method)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}const bindResult=super.bind(method);return this.scope=method,bindResult}}exports.AwsIntegration=AwsIntegration;
|
||||
38
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/http.d.ts
generated
vendored
Normal file
38
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/http.d.ts
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
import type { IntegrationOptions } from '../integration';
|
||||
import { Integration } from '../integration';
|
||||
export interface HttpIntegrationProps {
|
||||
/**
|
||||
* Determines whether to use proxy integration or custom integration.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly proxy?: boolean;
|
||||
/**
|
||||
* HTTP method to use when invoking the backend URL.
|
||||
* @default GET
|
||||
*/
|
||||
readonly httpMethod?: string;
|
||||
/**
|
||||
* Integration options, such as request/resopnse mapping, content handling,
|
||||
* etc.
|
||||
*
|
||||
* @default defaults based on `IntegrationOptions` defaults
|
||||
*/
|
||||
readonly options?: IntegrationOptions;
|
||||
}
|
||||
/**
|
||||
* You can integrate an API method with an HTTP endpoint using the HTTP proxy
|
||||
* integration or the HTTP custom integration,.
|
||||
*
|
||||
* With the proxy integration, the setup is simple. You only need to set the
|
||||
* HTTP method and the HTTP endpoint URI, according to the backend requirements,
|
||||
* if you are not concerned with content encoding or caching.
|
||||
*
|
||||
* With the custom integration, the setup is more involved. In addition to the
|
||||
* proxy integration setup steps, you need to specify how the incoming request
|
||||
* data is mapped to the integration request and how the resulting integration
|
||||
* response data is mapped to the method response.
|
||||
*/
|
||||
export declare class HttpIntegration extends Integration {
|
||||
constructor(url: string, props?: HttpIntegrationProps);
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/http.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/http.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.HttpIntegration=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var integration_1=()=>{var tmp=require("../integration");return integration_1=()=>tmp,tmp};class HttpIntegration extends integration_1().Integration{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_apigateway.HttpIntegration",version:"2.252.0"};constructor(url,props={}){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigateway_HttpIntegrationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,HttpIntegration),error}const proxy=props.proxy??!0,method=props.httpMethod||"GET";super({type:proxy?integration_1().IntegrationType.HTTP_PROXY:integration_1().IntegrationType.HTTP,integrationHttpMethod:method,uri:url,options:props.options})}}exports.HttpIntegration=HttpIntegration;
|
||||
7
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/index.d.ts
generated
vendored
Normal file
7
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export * from './aws';
|
||||
export * from './lambda';
|
||||
export * from './http';
|
||||
export * from './mock';
|
||||
export * from './stepfunctions';
|
||||
export * from './sagemaker';
|
||||
export * from './request-context';
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/index.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var __createBinding=exports&&exports.__createBinding||(Object.create?(function(o,m,k,k2){k2===void 0&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}):(function(o,m,k,k2){k2===void 0&&(k2=k),o[k2]=m[k]})),__exportStar=exports&&exports.__exportStar||function(m,exports2){for(var p in m)p!=="default"&&!Object.prototype.hasOwnProperty.call(exports2,p)&&__createBinding(exports2,m,p)};Object.defineProperty(exports,"__esModule",{value:!0});var _noFold;exports.AwsIntegration=void 0,Object.defineProperty(exports,_noFold="AwsIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./aws").AwsIntegration;return Object.defineProperty(exports,_noFold="AwsIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.LambdaIntegration=void 0,Object.defineProperty(exports,_noFold="LambdaIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./lambda").LambdaIntegration;return Object.defineProperty(exports,_noFold="LambdaIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.HttpIntegration=void 0,Object.defineProperty(exports,_noFold="HttpIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./http").HttpIntegration;return Object.defineProperty(exports,_noFold="HttpIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.MockIntegration=void 0,Object.defineProperty(exports,_noFold="MockIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./mock").MockIntegration;return Object.defineProperty(exports,_noFold="MockIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.StepFunctionsIntegration=void 0,Object.defineProperty(exports,_noFold="StepFunctionsIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./stepfunctions").StepFunctionsIntegration;return Object.defineProperty(exports,_noFold="StepFunctionsIntegration",{enumerable:!0,configurable:!0,value}),value}}),exports.SagemakerIntegration=void 0,Object.defineProperty(exports,_noFold="SagemakerIntegration",{enumerable:!0,configurable:!0,get:()=>{var value=require("./sagemaker").SagemakerIntegration;return Object.defineProperty(exports,_noFold="SagemakerIntegration",{enumerable:!0,configurable:!0,value}),value}});
|
||||
56
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/lambda.d.ts
generated
vendored
Normal file
56
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/lambda.d.ts
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
import { AwsIntegration } from './aws';
|
||||
import * as lambda from '../../../aws-lambda';
|
||||
import type { IntegrationConfig, IntegrationOptions } from '../integration';
|
||||
import type { Method } from '../method';
|
||||
export interface LambdaIntegrationOptions extends IntegrationOptions {
|
||||
/**
|
||||
* Use proxy integration or normal (request/response mapping) integration.
|
||||
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html#api-gateway-simple-proxy-for-lambda-output-format
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly proxy?: boolean;
|
||||
/**
|
||||
* Allow invoking method from AWS Console UI (for testing purposes).
|
||||
*
|
||||
* This will add another permission to the AWS Lambda resource policy which
|
||||
* will allow the `test-invoke-stage` stage to invoke this handler. If this
|
||||
* is set to `false`, the function will only be usable from the deployment
|
||||
* endpoint.
|
||||
*
|
||||
* Note that this property is ignored when `scopePermissionToMethod` is `false`.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly allowTestInvoke?: boolean;
|
||||
/**
|
||||
* Scope the permission for invoking the AWS Lambda down to the specific method
|
||||
* associated with this integration.
|
||||
*
|
||||
* If this is set to `false`, the permission will allow invoking the AWS Lambda
|
||||
* from any method. This is useful for reducing the AWS Lambda policy size
|
||||
* for cases where the same AWS Lambda function is reused for many integrations.
|
||||
*
|
||||
* Note that this will always allow test invocations.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly scopePermissionToMethod?: boolean;
|
||||
}
|
||||
/**
|
||||
* Integrates an AWS Lambda function to an API Gateway method.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* declare const resource: apigateway.Resource;
|
||||
* declare const handler: lambda.Function;
|
||||
* resource.addMethod('GET', new apigateway.LambdaIntegration(handler));
|
||||
*
|
||||
*/
|
||||
export declare class LambdaIntegration extends AwsIntegration {
|
||||
private readonly handler;
|
||||
private readonly enableTest;
|
||||
private readonly scopePermissionToMethod;
|
||||
constructor(handler: lambda.IFunction, options?: LambdaIntegrationOptions);
|
||||
bind(method: Method): IntegrationConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/lambda.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/lambda.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LambdaIntegration=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var aws_1=()=>{var tmp=require("./aws");return aws_1=()=>tmp,tmp},iam=()=>{var tmp=require("../../../aws-iam");return iam=()=>tmp,tmp},lambda=()=>{var tmp=require("../../../aws-lambda");return lambda=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},integration_1=()=>{var tmp=require("../integration");return integration_1=()=>tmp,tmp};class LambdaIntegration extends aws_1().AwsIntegration{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_apigateway.LambdaIntegration",version:"2.252.0"};handler;enableTest;scopePermissionToMethod;constructor(handler,options={}){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_lambda_IFunction(handler),jsiiDeprecationWarnings().aws_cdk_lib_aws_apigateway_LambdaIntegrationOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,LambdaIntegration),error}const proxy=options.proxy??!0,path=options.responseTransferMode===integration_1().ResponseTransferMode.STREAM?`2021-11-15/functions/${handler.functionArn}/response-streaming-invocations`:`2015-03-31/functions/${handler.functionArn}/invocations`;super({proxy,service:"lambda",path,options}),this.handler=handler,this.enableTest=options.allowTestInvoke??!0,this.scopePermissionToMethod=options.scopePermissionToMethod??!0}bind(method){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigateway_Method(method)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}const bindResult=super.bind(method),principal=new(iam()).ServicePrincipal("apigateway.amazonaws.com");if(this.scopePermissionToMethod){const desc=`${core_1().Names.nodeUniqueId(method.api.node)}.${method.httpMethod}.${method.resource.path.replace(/\//g,".")}`;this.handler.addPermission(`ApiPermission.${desc}`,{principal,scope:method,sourceArn:core_1().Lazy.string({produce:()=>method.methodArn})}),this.enableTest&&this.handler.addPermission(`ApiPermission.Test.${desc}`,{principal,scope:method,sourceArn:method.testMethodArn})}else{const apiScopedPermissionId=`ApiPermission.ApiScoped.${core_1().Names.nodeUniqueId(this.handler.node)}.${core_1().Names.nodeUniqueId(method.api.node)}`;method.api.node.findAll().find(c=>c instanceof lambda().CfnPermission&&c.node.id===apiScopedPermissionId)||this.handler.addPermission(apiScopedPermissionId,{principal,scope:method.api,sourceArn:core_1().Lazy.string({produce:()=>method.api.arnForExecuteApi()})}),this.enableTest||core_1().Annotations.of(method).addWarningV2("@aws-cdk/aws-apigateway:allowTestInvoke","Value 'false' for 'allowTestInvoke' in LambdaIntegration is ignored since 'scopePermissionToMethod' is 'false'")}let functionName;this.handler instanceof lambda().Function?functionName=this.handler.node.defaultChild.functionName:functionName=this.handler.functionName;let deploymentToken;return core_1().Token.isUnresolved(functionName)||(deploymentToken=JSON.stringify({functionName})),{...bindResult,deploymentToken}}}exports.LambdaIntegration=LambdaIntegration;
|
||||
17
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/mock.d.ts
generated
vendored
Normal file
17
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/mock.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import type { IntegrationOptions } from '../integration';
|
||||
import { Integration } from '../integration';
|
||||
/**
|
||||
* This type of integration lets API Gateway return a response without sending
|
||||
* the request further to the backend. This is useful for API testing because it
|
||||
* can be used to test the integration set up without incurring charges for
|
||||
* using the backend and to enable collaborative development of an API. In
|
||||
* collaborative development, a team can isolate their development effort by
|
||||
* setting up simulations of API components owned by other teams by using the
|
||||
* MOCK integrations. It is also used to return CORS-related headers to ensure
|
||||
* that the API method permits CORS access. In fact, the API Gateway console
|
||||
* integrates the OPTIONS method to support CORS with a mock integration.
|
||||
* Gateway responses are other examples of mock integrations.
|
||||
*/
|
||||
export declare class MockIntegration extends Integration {
|
||||
constructor(options?: IntegrationOptions);
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/mock.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/mock.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MockIntegration=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var integration_1=()=>{var tmp=require("../integration");return integration_1=()=>tmp,tmp};class MockIntegration extends integration_1().Integration{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_apigateway.MockIntegration",version:"2.252.0"};constructor(options){super({type:integration_1().IntegrationType.MOCK,options});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigateway_IntegrationOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,MockIntegration),error}}}exports.MockIntegration=MockIntegration;
|
||||
144
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/request-context.d.ts
generated
vendored
Normal file
144
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/request-context.d.ts
generated
vendored
Normal file
@@ -0,0 +1,144 @@
|
||||
/**
|
||||
* Configure what must be included in the `requestContext`
|
||||
*
|
||||
* More details can be found at mapping templates documentation.
|
||||
* @see https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html
|
||||
*/
|
||||
export interface RequestContext {
|
||||
/**
|
||||
* Represents the information of $context.identity.accountId
|
||||
*
|
||||
* Whether the AWS account of the API owner should be included in the request context
|
||||
* @default false
|
||||
*/
|
||||
readonly accountId?: boolean;
|
||||
/**
|
||||
* Represents the information of $context.apiId
|
||||
*
|
||||
* Whether the identifier API Gateway assigns to your API should be included in the request context.
|
||||
* @default false
|
||||
*/
|
||||
readonly apiId?: boolean;
|
||||
/**
|
||||
* Represents the information of $context.identity.apiKey
|
||||
*
|
||||
* Whether the API key associated with the request should be included in request context.
|
||||
* @default false
|
||||
*/
|
||||
readonly apiKey?: boolean;
|
||||
/**
|
||||
* Represents the information of $context.authorizer.principalId
|
||||
*
|
||||
* Whether the principal user identifier associated with the token sent by the client and returned
|
||||
* from an API Gateway Lambda authorizer should be included in the request context.
|
||||
* @default false
|
||||
*/
|
||||
readonly authorizerPrincipalId?: boolean;
|
||||
/**
|
||||
* Represents the information of $context.identity.caller
|
||||
*
|
||||
* Whether the principal identifier of the caller that signed the request should be included in the request context.
|
||||
* Supported for resources that use IAM authorization.
|
||||
* @default false
|
||||
*/
|
||||
readonly caller?: boolean;
|
||||
/**
|
||||
* Represents the information of $context.identity.cognitoAuthenticationProvider
|
||||
*
|
||||
* Whether the list of the Amazon Cognito authentication providers used by the caller making the request should be included in the request context.
|
||||
* Available only if the request was signed with Amazon Cognito credentials.
|
||||
* @default false
|
||||
*/
|
||||
readonly cognitoAuthenticationProvider?: boolean;
|
||||
/**
|
||||
* Represents the information of $context.identity.cognitoAuthenticationType
|
||||
*
|
||||
* Whether the Amazon Cognito authentication type of the caller making the request should be included in the request context.
|
||||
* Available only if the request was signed with Amazon Cognito credentials.
|
||||
* Possible values include authenticated for authenticated identities and unauthenticated for unauthenticated identities.
|
||||
* @default false
|
||||
*/
|
||||
readonly cognitoAuthenticationType?: boolean;
|
||||
/**
|
||||
* Represents the information of $context.identity.cognitoIdentityId
|
||||
*
|
||||
* Whether the Amazon Cognito identity ID of the caller making the request should be included in the request context.
|
||||
* Available only if the request was signed with Amazon Cognito credentials.
|
||||
* @default false
|
||||
*/
|
||||
readonly cognitoIdentityId?: boolean;
|
||||
/**
|
||||
* Represents the information of $context.identity.cognitoIdentityPoolId
|
||||
*
|
||||
* Whether the Amazon Cognito identity pool ID of the caller making the request should be included in the request context.
|
||||
* Available only if the request was signed with Amazon Cognito credentials.
|
||||
* @default false
|
||||
*/
|
||||
readonly cognitoIdentityPoolId?: boolean;
|
||||
/**
|
||||
* Represents the information of $context.httpMethod
|
||||
*
|
||||
* Whether the HTTP method used should be included in the request context.
|
||||
* Valid values include: DELETE, GET, HEAD, OPTIONS, PATCH, POST, and PUT.
|
||||
* @default false
|
||||
*/
|
||||
readonly httpMethod?: boolean;
|
||||
/**
|
||||
* Represents the information of $context.stage
|
||||
*
|
||||
* Whether the deployment stage of the API request should be included in the request context.
|
||||
* @default false
|
||||
*/
|
||||
readonly stage?: boolean;
|
||||
/**
|
||||
* Represents the information of $context.identity.sourceIp
|
||||
*
|
||||
* Whether the source IP address of the immediate TCP connection making the request
|
||||
* to API Gateway endpoint should be included in the request context.
|
||||
* @default false
|
||||
*/
|
||||
readonly sourceIp?: boolean;
|
||||
/**
|
||||
* Represents the information of $context.identity.user
|
||||
*
|
||||
* Whether the principal identifier of the user that will be authorized should be included in the request context.
|
||||
* Supported for resources that use IAM authorization.
|
||||
* @default false
|
||||
*/
|
||||
readonly user?: boolean;
|
||||
/**
|
||||
* Represents the information of $context.identity.userAgent
|
||||
*
|
||||
* Whether the User-Agent header of the API caller should be included in the request context.
|
||||
* @default false
|
||||
*/
|
||||
readonly userAgent?: boolean;
|
||||
/**
|
||||
* Represents the information of $context.identity.userArn
|
||||
*
|
||||
* Whether the Amazon Resource Name (ARN) of the effective user identified after authentication should be included in the request context.
|
||||
* @default false
|
||||
*/
|
||||
readonly userArn?: boolean;
|
||||
/**
|
||||
* Represents the information of $context.requestId
|
||||
*
|
||||
* Whether the ID for the request should be included in the request context.
|
||||
* @default false
|
||||
*/
|
||||
readonly requestId?: boolean;
|
||||
/**
|
||||
* Represents the information of $context.resourceId
|
||||
*
|
||||
* Whether the identifier that API Gateway assigns to your resource should be included in the request context.
|
||||
* @default false
|
||||
*/
|
||||
readonly resourceId?: boolean;
|
||||
/**
|
||||
* Represents the information of $context.resourcePath
|
||||
*
|
||||
* Whether the path to the resource should be included in the request context.
|
||||
* @default false
|
||||
*/
|
||||
readonly resourcePath?: boolean;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/request-context.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/request-context.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
||||
24
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/sagemaker.d.ts
generated
vendored
Normal file
24
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/sagemaker.d.ts
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
import { AwsIntegration } from './aws';
|
||||
import type { IEndpoint } from '../../../aws-sagemaker';
|
||||
import type { IntegrationConfig, IntegrationOptions } from '../integration';
|
||||
import type { Method } from '../method';
|
||||
/**
|
||||
* Options for SageMakerIntegration
|
||||
*/
|
||||
export interface SagemakerIntegrationOptions extends IntegrationOptions {
|
||||
}
|
||||
/**
|
||||
* Integrates an AWS Sagemaker Endpoint to an API Gateway method
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* declare const resource: apigateway.Resource;
|
||||
* declare const endpoint: sagemaker.IEndpoint;
|
||||
* resource.addMethod('POST', new apigateway.SagemakerIntegration(endpoint));
|
||||
*
|
||||
*/
|
||||
export declare class SagemakerIntegration extends AwsIntegration {
|
||||
private readonly endpoint;
|
||||
constructor(endpoint: IEndpoint, options?: SagemakerIntegrationOptions);
|
||||
bind(method: Method): IntegrationConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/sagemaker.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/sagemaker.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SagemakerIntegration=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var aws_1=()=>{var tmp=require("./aws");return aws_1=()=>tmp,tmp},iam=()=>{var tmp=require("../../../aws-iam");return iam=()=>tmp,tmp};class SagemakerIntegration extends aws_1().AwsIntegration{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_apigateway.SagemakerIntegration",version:"2.252.0"};endpoint;constructor(endpoint,options={}){super({service:"runtime.sagemaker",path:`endpoints/${endpoint.endpointName}/invocations`,options:{credentialsRole:options.credentialsRole,integrationResponses:[{statusCode:"200"}],...options}});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_sagemaker_IEndpoint(endpoint),jsiiDeprecationWarnings().aws_cdk_lib_aws_apigateway_SagemakerIntegrationOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,SagemakerIntegration),error}this.endpoint=endpoint}bind(method){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigateway_Method(method)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bind),error}const bindResult=super.bind(method),credentialsRole=bindResult.options?.credentialsRole??new(iam()).Role(method,"SagemakerRole",{assumedBy:new(iam()).ServicePrincipal("apigateway.amazonaws.com"),description:"Generated by CDK::ApiGateway::SagemakerIntegration"});return this.endpoint.grantInvoke(credentialsRole),method.addMethodResponse({statusCode:"200"}),{...bindResult,options:{...bindResult.options,credentialsRole}}}}exports.SagemakerIntegration=SagemakerIntegration;
|
||||
102
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/stepfunctions.d.ts
generated
vendored
Normal file
102
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/stepfunctions.d.ts
generated
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
import type { RequestContext } from '.';
|
||||
import { AwsIntegration } from './aws';
|
||||
import * as sfn from '../../../aws-stepfunctions';
|
||||
import type { IntegrationOptions } from '../integration';
|
||||
/**
|
||||
* Options when configuring Step Functions synchronous integration with Rest API
|
||||
*/
|
||||
export interface StepFunctionsExecutionIntegrationOptions extends IntegrationOptions {
|
||||
/**
|
||||
* Which details of the incoming request must be passed onto the underlying state machine,
|
||||
* such as, account id, user identity, request id, etc. The execution input will include a new key `requestContext`:
|
||||
*
|
||||
* {
|
||||
* "body": {},
|
||||
* "requestContext": {
|
||||
* "key": "value"
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* @default - all parameters within request context will be set as false
|
||||
*/
|
||||
readonly requestContext?: RequestContext;
|
||||
/**
|
||||
* Check if querystring is to be included inside the execution input. The execution input will include a new key `queryString`:
|
||||
*
|
||||
* {
|
||||
* "body": {},
|
||||
* "querystring": {
|
||||
* "key": "value"
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly querystring?: boolean;
|
||||
/**
|
||||
* Check if path is to be included inside the execution input. The execution input will include a new key `path`:
|
||||
*
|
||||
* {
|
||||
* "body": {},
|
||||
* "path": {
|
||||
* "resourceName": "resourceValue"
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly path?: boolean;
|
||||
/**
|
||||
* Check if header is to be included inside the execution input. The execution input will include a new key `headers`:
|
||||
*
|
||||
* {
|
||||
* "body": {},
|
||||
* "headers": {
|
||||
* "header1": "value",
|
||||
* "header2": "value"
|
||||
* }
|
||||
* }
|
||||
* @default false
|
||||
*/
|
||||
readonly headers?: boolean;
|
||||
/**
|
||||
* If the whole authorizer object, including custom context values should be in the execution input. The execution input will include a new key `authorizer`:
|
||||
*
|
||||
* {
|
||||
* "body": {},
|
||||
* "authorizer": {
|
||||
* "key": "value"
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly authorizer?: boolean;
|
||||
/**
|
||||
* Whether to add default response models with 200, 400, and 500 status codes to the method.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly useDefaultMethodResponses?: boolean;
|
||||
}
|
||||
/**
|
||||
* Options to integrate with various StepFunction API
|
||||
*/
|
||||
export declare class StepFunctionsIntegration {
|
||||
/**
|
||||
* Integrates a Synchronous Express State Machine from AWS Step Functions to an API Gateway method.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* const stateMachine = new stepfunctions.StateMachine(this, 'MyStateMachine', {
|
||||
* stateMachineType: stepfunctions.StateMachineType.EXPRESS,
|
||||
* definition: stepfunctions.Chain.start(new stepfunctions.Pass(this, 'Pass')),
|
||||
* });
|
||||
*
|
||||
* const api = new apigateway.RestApi(this, 'Api', {
|
||||
* restApiName: 'MyApi',
|
||||
* });
|
||||
* api.root.addMethod('GET', apigateway.StepFunctionsIntegration.startExecution(stateMachine));
|
||||
*/
|
||||
static startExecution(stateMachine: sfn.IStateMachine, options?: StepFunctionsExecutionIntegrationOptions): AwsIntegration;
|
||||
}
|
||||
6
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/stepfunctions.js
generated
vendored
Normal file
6
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/stepfunctions.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.StepFunctionsIntegration=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var fs=()=>{var tmp=require("fs");return fs=()=>tmp,tmp},path=()=>{var tmp=require("path");return path=()=>tmp,tmp},aws_1=()=>{var tmp=require("./aws");return aws_1=()=>tmp,tmp},iam=()=>{var tmp=require("../../../aws-iam");return iam=()=>tmp,tmp},sfn=()=>{var tmp=require("../../../aws-stepfunctions");return sfn=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},errors_1=()=>{var tmp=require("../../../core/lib/errors");return errors_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},integration_1=()=>{var tmp=require("../integration");return integration_1=()=>tmp,tmp},model_1=()=>{var tmp=require("../model");return model_1=()=>tmp,tmp};class StepFunctionsIntegration{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_apigateway.StepFunctionsIntegration",version:"2.252.0"};static startExecution(stateMachine,options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_IStateMachine(stateMachine),jsiiDeprecationWarnings().aws_cdk_lib_aws_apigateway_StepFunctionsExecutionIntegrationOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.startExecution),error}return new StepFunctionsExecutionIntegration(stateMachine,options)}}exports.StepFunctionsIntegration=StepFunctionsIntegration;class StepFunctionsExecutionIntegration extends aws_1().AwsIntegration{stateMachine;useDefaultMethodResponses;constructor(stateMachine,options={}){super({service:"states",action:"StartSyncExecution",options:{credentialsRole:options.credentialsRole,integrationResponses:options.integrationResponses??integrationResponse(),passthroughBehavior:integration_1().PassthroughBehavior.NEVER,requestTemplates:requestTemplates(stateMachine,options),...options}}),this.stateMachine=stateMachine,this.useDefaultMethodResponses=options.useDefaultMethodResponses??!0}bind(method){const bindResult=super.bind(method),credentialsRole=bindResult.options?.credentialsRole??new(iam()).Role(method,"StartSyncExecutionRole",{assumedBy:new(iam()).ServicePrincipal("apigateway.amazonaws.com")});this.stateMachine.grantStartSyncExecution(credentialsRole);let stateMachineName;if(this.stateMachine instanceof sfn().StateMachine){if(this.stateMachine.stateMachineType!==sfn().StateMachineType.EXPRESS)throw new(errors_1()).ValidationError((0,literal_string_1().lit)`MustBeStateMachineType`,'State Machine must be of type "EXPRESS". Please use StateMachineType.EXPRESS as the stateMachineType',method);stateMachineName=this.stateMachine.node.defaultChild.stateMachineName}else stateMachineName=`StateMachine-${this.stateMachine.stack.node.addr}`;let deploymentToken;if(stateMachineName!==void 0&&!core_1().Token.isUnresolved(stateMachineName)&&(deploymentToken=JSON.stringify({stateMachineName})),this.useDefaultMethodResponses)for(const methodResponse of METHOD_RESPONSES)method.addMethodResponse(methodResponse);return{...bindResult,options:{...bindResult.options,credentialsRole},deploymentToken}}}function integrationResponse(){const errorResponse=[{selectionPattern:"4\\d{2}",statusCode:"400",responseTemplates:{"application/json":`{
|
||||
"error": "Bad request!"
|
||||
}`}},{selectionPattern:"5\\d{2}",statusCode:"500",responseTemplates:{"application/json":`{
|
||||
"error": "$input.path('$.error')"
|
||||
}`}}];return[{statusCode:"200",responseTemplates:{"application/json":["#set($inputRoot = $input.path('$'))",`#if($input.path('$.status').toString().equals("FAILED"))`,"#set($context.responseOverride.status = 500)","{",`"error": "$input.path('$.error')",`,`"cause": "$input.path('$.cause')"`,"}","#else","$input.path('$.output')","#end"].join(`
|
||||
`)}},...errorResponse]}function requestTemplates(stateMachine,options){return{"application/json":templateString(stateMachine,options)}}function templateString(stateMachine,options){let templateStr,requestContextStr="";const includeHeader=options.headers??!1,includeQueryString=options.querystring??!0,includePath=options.path??!0,includeAuthorizer=options.authorizer??!1;return options.requestContext&&Object.keys(options.requestContext).length>0&&(requestContextStr=requestContext(options.requestContext)),templateStr=fs().readFileSync(path().join(__dirname,"stepfunctions.vtl"),{encoding:"utf-8"}),templateStr=templateStr.replace("%STATEMACHINE%",stateMachine.stateMachineArn),templateStr=templateStr.replace("%INCLUDE_HEADERS%",String(includeHeader)),templateStr=templateStr.replace("%INCLUDE_QUERYSTRING%",String(includeQueryString)),templateStr=templateStr.replace("%INCLUDE_PATH%",String(includePath)),templateStr=templateStr.replace("%INCLUDE_AUTHORIZER%",String(includeAuthorizer)),templateStr=templateStr.replace("%REQUESTCONTEXT%",requestContextStr),templateStr}function requestContext(requestContextObj){const context={accountId:requestContextObj?.accountId?"$context.identity.accountId":void 0,apiId:requestContextObj?.apiId?"$context.apiId":void 0,apiKey:requestContextObj?.apiKey?"$context.identity.apiKey":void 0,authorizerPrincipalId:requestContextObj?.authorizerPrincipalId?"$context.authorizer.principalId":void 0,caller:requestContextObj?.caller?"$context.identity.caller":void 0,cognitoAuthenticationProvider:requestContextObj?.cognitoAuthenticationProvider?"$context.identity.cognitoAuthenticationProvider":void 0,cognitoAuthenticationType:requestContextObj?.cognitoAuthenticationType?"$context.identity.cognitoAuthenticationType":void 0,cognitoIdentityId:requestContextObj?.cognitoIdentityId?"$context.identity.cognitoIdentityId":void 0,cognitoIdentityPoolId:requestContextObj?.cognitoIdentityPoolId?"$context.identity.cognitoIdentityPoolId":void 0,httpMethod:requestContextObj?.httpMethod?"$context.httpMethod":void 0,stage:requestContextObj?.stage?"$context.stage":void 0,sourceIp:requestContextObj?.sourceIp?"$context.identity.sourceIp":void 0,user:requestContextObj?.user?"$context.identity.user":void 0,userAgent:requestContextObj?.userAgent?"$context.identity.userAgent":void 0,userArn:requestContextObj?.userArn?"$context.identity.userArn":void 0,requestId:requestContextObj?.requestId?"$context.requestId":void 0,resourceId:requestContextObj?.resourceId?"$context.resourceId":void 0,resourcePath:requestContextObj?.resourcePath?"$context.resourcePath":void 0};return JSON.stringify(context).split('"').join("@@")}const METHOD_RESPONSES=[{statusCode:"200",responseModels:{"application/json":model_1().Model.EMPTY_MODEL}},{statusCode:"400",responseModels:{"application/json":model_1().Model.ERROR_MODEL}},{statusCode:"500",responseModels:{"application/json":model_1().Model.ERROR_MODEL}}];
|
||||
75
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/stepfunctions.vtl
generated
vendored
Normal file
75
cdk/node_modules/aws-cdk-lib/aws-apigateway/lib/integrations/stepfunctions.vtl
generated
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
## Velocity Template used for API Gateway request mapping template
|
||||
##
|
||||
## This template forwards the request body, header, path, and querystring
|
||||
## to the execution input of the state machine.
|
||||
##
|
||||
## "@@" is used here as a placeholder for '"' to avoid using escape characters.
|
||||
|
||||
#set($inputString = '')
|
||||
#set($includeHeaders = %INCLUDE_HEADERS%)
|
||||
#set($includeQueryString = %INCLUDE_QUERYSTRING%)
|
||||
#set($includePath = %INCLUDE_PATH%)
|
||||
#set($includeAuthorizer = %INCLUDE_AUTHORIZER%)
|
||||
#set($allParams = $input.params())
|
||||
{
|
||||
"stateMachineArn": "%STATEMACHINE%",
|
||||
|
||||
#set($inputString = "$inputString,@@body@@: $input.body")
|
||||
|
||||
#if ($includeHeaders)
|
||||
#set($inputString = "$inputString, @@header@@:{")
|
||||
#foreach($paramName in $allParams.header.keySet())
|
||||
#set($inputString = "$inputString @@$paramName@@: @@$util.escapeJavaScript($allParams.header.get($paramName))@@")
|
||||
#if($foreach.hasNext)
|
||||
#set($inputString = "$inputString,")
|
||||
#end
|
||||
#end
|
||||
#set($inputString = "$inputString }")
|
||||
|
||||
#end
|
||||
|
||||
#if ($includeQueryString)
|
||||
#set($inputString = "$inputString, @@querystring@@:{")
|
||||
#foreach($paramName in $allParams.querystring.keySet())
|
||||
#set($inputString = "$inputString @@$paramName@@: @@$util.escapeJavaScript($allParams.querystring.get($paramName))@@")
|
||||
#if($foreach.hasNext)
|
||||
#set($inputString = "$inputString,")
|
||||
#end
|
||||
#end
|
||||
#set($inputString = "$inputString }")
|
||||
#end
|
||||
|
||||
#if ($includePath)
|
||||
#set($inputString = "$inputString, @@path@@:{")
|
||||
#foreach($paramName in $allParams.path.keySet())
|
||||
#set($inputString = "$inputString @@$paramName@@: @@$util.escapeJavaScript($allParams.path.get($paramName))@@")
|
||||
#if($foreach.hasNext)
|
||||
#set($inputString = "$inputString,")
|
||||
#end
|
||||
#end
|
||||
#set($inputString = "$inputString }")
|
||||
#end
|
||||
|
||||
#if ($includeAuthorizer)
|
||||
#set($inputString = "$inputString, @@authorizer@@:{")
|
||||
#foreach($paramName in $context.authorizer.keySet())
|
||||
#set($inputString = "$inputString @@$paramName@@: @@$util.escapeJavaScript($context.authorizer.get($paramName))@@")
|
||||
#if($foreach.hasNext)
|
||||
#set($inputString = "$inputString,")
|
||||
#end
|
||||
#end
|
||||
#set($inputString = "$inputString }")
|
||||
#end
|
||||
|
||||
#set($requestContext = "%REQUESTCONTEXT%")
|
||||
## Check if the request context should be included as part of the execution input
|
||||
#if($requestContext && !$requestContext.empty)
|
||||
#set($inputString = "$inputString,")
|
||||
#set($inputString = "$inputString @@requestContext@@: $requestContext")
|
||||
#end
|
||||
|
||||
#set($inputString = "$inputString}")
|
||||
#set($inputString = $inputString.replaceAll("@@",'"'))
|
||||
#set($len = $inputString.length() - 1)
|
||||
"input": "{$util.escapeJavaScript($inputString.substring(1,$len)).replaceAll("\\'","'")}"
|
||||
}
|
||||
Reference in New Issue
Block a user