agent-claw: automated task changes
This commit is contained in:
35
cdk/node_modules/aws-cdk-lib/aws-cloudfront/lib/private/cache-behavior.d.ts
generated
vendored
Normal file
35
cdk/node_modules/aws-cdk-lib/aws-cloudfront/lib/private/cache-behavior.d.ts
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
import type { CfnDistribution } from '../cloudfront.generated';
|
||||
import type { AddBehaviorOptions } from '../distribution';
|
||||
/**
|
||||
* Properties for specifying custom behaviors for origins.
|
||||
*/
|
||||
export interface CacheBehaviorProps extends AddBehaviorOptions {
|
||||
/**
|
||||
* The pattern (e.g., `images/*.jpg`) that specifies which requests to apply the behavior to.
|
||||
* There must be exactly one behavior associated with each `Distribution` that has a path pattern
|
||||
* of '*', which acts as the catch-all default behavior.
|
||||
*/
|
||||
readonly pathPattern: string;
|
||||
}
|
||||
/**
|
||||
* Allows configuring a variety of CloudFront functionality for a given URL path pattern.
|
||||
*
|
||||
* Note: This really should simply by called 'Behavior', but this name is already taken by the legacy
|
||||
* CloudFrontWebDistribution implementation.
|
||||
*/
|
||||
export declare class CacheBehavior {
|
||||
private readonly props;
|
||||
private readonly originId;
|
||||
constructor(originId: string, props: CacheBehaviorProps);
|
||||
/**
|
||||
* Creates and returns the CloudFormation representation of this behavior.
|
||||
* This renders as a "CacheBehaviorProperty" regardless of if this is a default
|
||||
* cache behavior or not, as the two are identical except that the pathPattern
|
||||
* is omitted for the default cache behavior.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
_renderBehavior(): CfnDistribution.CacheBehaviorProperty;
|
||||
private validateEdgeLambdas;
|
||||
private grantEdgeLambdaFunctionExecutionRole;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudfront/lib/private/cache-behavior.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudfront/lib/private/cache-behavior.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CacheBehavior=void 0;var iam=()=>{var tmp=require("../../../aws-iam");return iam=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},cache_policy_1=()=>{var tmp=require("../cache-policy");return cache_policy_1=()=>tmp,tmp},distribution_1=()=>{var tmp=require("../distribution");return distribution_1=()=>tmp,tmp};class CacheBehavior{props;originId;constructor(originId,props){if(this.props=props,this.originId=originId,props.enableGrpc){if(props.allowedMethods!==distribution_1().AllowedMethods.ALLOW_ALL)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`AllowedMethodsOnlyAllowAllIfGrpcEnabled`,"'allowedMethods' can only be AllowedMethods.ALLOW_ALL if 'enableGrpc' is true");if(props.edgeLambdas!==void 0&&props.edgeLambdas.length>0)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`EdgeLambdasCannotBeSpecifiedIfGrpcEnabled`,"'edgeLambdas' cannot be specified if 'enableGrpc' is true")}this.validateEdgeLambdas(props.edgeLambdas),this.grantEdgeLambdaFunctionExecutionRole(props.edgeLambdas)}_renderBehavior(){return{pathPattern:this.props.pathPattern,targetOriginId:this.originId,allowedMethods:this.props.allowedMethods?.methods,cachedMethods:this.props.cachedMethods?.methods,cachePolicyId:(this.props.cachePolicy?.cachePolicyRef??cache_policy_1().CachePolicy.CACHING_OPTIMIZED).cachePolicyId,compress:this.props.compress??!0,originRequestPolicyId:this.props.originRequestPolicy?.originRequestPolicyRef.originRequestPolicyId,realtimeLogConfigArn:this.props?.realtimeLogConfig?.realtimeLogConfigRef.realtimeLogConfigArn,responseHeadersPolicyId:this.props.responseHeadersPolicy?.responseHeadersPolicyRef.responseHeadersPolicyId,smoothStreaming:this.props.smoothStreaming,viewerProtocolPolicy:this.props.viewerProtocolPolicy??distribution_1().ViewerProtocolPolicy.ALLOW_ALL,functionAssociations:this.props.functionAssociations?.map(association=>({functionArn:association.function.functionRef.functionArn,eventType:association.eventType.toString()})),lambdaFunctionAssociations:this.props.edgeLambdas?.map(edgeLambda=>({lambdaFunctionArn:edgeLambda.functionVersion.edgeArn,eventType:edgeLambda.eventType.toString(),includeBody:edgeLambda.includeBody})),trustedKeyGroups:this.props.trustedKeyGroups?.map(keyGroup=>keyGroup.keyGroupRef.keyGroupId),grpcConfig:this.props.enableGrpc!==void 0?{enabled:this.props.enableGrpc}:void 0}}validateEdgeLambdas(edgeLambdas){const includeBodyEventTypes=[distribution_1().LambdaEdgeEventType.ORIGIN_REQUEST,distribution_1().LambdaEdgeEventType.VIEWER_REQUEST];if(edgeLambdas&&edgeLambdas.some(lambda=>lambda.includeBody&&!includeBodyEventTypes.includes(lambda.eventType)))throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`IncludeBodyOnlyTrueForRequestEventTypes`,"'includeBody' can only be true for ORIGIN_REQUEST or VIEWER_REQUEST event types.")}grantEdgeLambdaFunctionExecutionRole(edgeLambdas){!edgeLambdas||edgeLambdas.length===0||edgeLambdas.forEach(edgeLambda=>{const role=edgeLambda.functionVersion.role;role&&iam().Role.isRole(role)&&role.assumeRolePolicy&&role.assumeRolePolicy.addStatements(new(iam()).PolicyStatement({actions:["sts:AssumeRole"],principals:[new(iam()).ServicePrincipal("edgelambda.amazonaws.com")]}))})}}exports.CacheBehavior=CacheBehavior;
|
||||
11
cdk/node_modules/aws-cdk-lib/aws-cloudfront/lib/private/utils.d.ts
generated
vendored
Normal file
11
cdk/node_modules/aws-cdk-lib/aws-cloudfront/lib/private/utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import type { IDistribution } from '..';
|
||||
import * as iam from '../../../aws-iam';
|
||||
/**
|
||||
* Format distribution ARN from stack and distribution ID.
|
||||
*/
|
||||
export declare function formatDistributionArn(dist: IDistribution): string;
|
||||
/**
|
||||
* Adds an IAM policy statement associated with this distribution to an IAM
|
||||
* principal's policy.
|
||||
*/
|
||||
export declare function grant(dist: IDistribution, grantee: iam.IGrantable, ...actions: string[]): iam.Grant;
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-cloudfront/lib/private/utils.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-cloudfront/lib/private/utils.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.formatDistributionArn=formatDistributionArn,exports.grant=grant;var iam=()=>{var tmp=require("../../../aws-iam");return iam=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp};const wildcardOnlyActions=["cloudfront:CreateFieldLevelEncryptionConfig","cloudfront:CreateFieldLevelEncryptionProfile","cloudfront:CreateKeyGroup","cloudfront:CreateMonitoringSubscription","cloudfront:CreateOriginAccessControl","cloudfront:CreatePublicKey","cloudfront:CreateSavingsPlan","cloudfront:DeleteKeyGroup","cloudfront:DeleteMonitoringSubscription","cloudfront:DeletePublicKey","cloudfront:GetKeyGroup","cloudfront:GetKeyGroupConfig","cloudfront:GetMonitoringSubscription","cloudfront:GetPublicKey","cloudfront:GetPublicKeyConfig","cloudfront:GetSavingsPlan","cloudfront:ListAnycastIpLists","cloudfront:ListCachePolicies","cloudfront:ListCloudFrontOriginAccessIdentities","cloudfront:ListContinuousDeploymentPolicies","cloudfront:ListDistributions","cloudfront:ListDistributionsByAnycastIpListId","cloudfront:ListDistributionsByCachePolicyId","cloudfront:ListDistributionsByKeyGroup","cloudfront:ListDistributionsByLambdaFunction","cloudfront:ListDistributionsByOriginRequestPolicyId","cloudfront:ListDistributionsByRealtimeLogConfig","cloudfront:ListDistributionsByResponseHeadersPolicyId","cloudfront:ListDistributionsByVpcOriginId","cloudfront:ListDistributionsByWebACLId","cloudfront:ListFieldLevelEncryptionConfigs","cloudfront:ListFieldLevelEncryptionProfiles","cloudfront:ListFunctions","cloudfront:ListKeyGroups","cloudfront:ListKeyValueStores","cloudfront:ListOriginAccessControls","cloudfront:ListOriginRequestPolicies","cloudfront:ListPublicKeys","cloudfront:ListRateCards","cloudfront:ListRealtimeLogConfigs","cloudfront:ListResponseHeadersPolicies","cloudfront:ListSavingsPlans","cloudfront:ListStreamingDistributions","cloudfront:ListUsages","cloudfront:ListVpcOrigins","cloudfront:UpdateFieldLevelEncryptionConfig","cloudfront:UpdateKeyGroup","cloudfront:UpdatePublicKey","cloudfront:UpdateSavingsPlan"];function formatDistributionArn(dist){return core_1().Stack.of(dist).formatArn({service:"cloudfront",region:"",resource:"distribution",resourceName:dist.distributionId})}function grant(dist,grantee,...actions){const wildcardActions=[],resourceLevelSupportedActions=[];let wildcardGrant,resourceLevelGrant;for(const action of actions)wildcardOnlyActions.includes(action)?wildcardActions.push(action):resourceLevelSupportedActions.push(action);return wildcardActions.length>0&&(wildcardGrant=iam().Grant.addToPrincipal({grantee,actions:wildcardActions,resourceArns:["*"]})),resourceLevelSupportedActions.length>0&&(resourceLevelGrant=iam().Grant.addToPrincipal({grantee,actions:resourceLevelSupportedActions,resourceArns:[formatDistributionArn(dist)]})),wildcardActions.length>0&&resourceLevelSupportedActions.length>0?resourceLevelGrant.combine(wildcardGrant):wildcardActions.length>0?wildcardGrant:resourceLevelGrant}
|
||||
Reference in New Issue
Block a user