Skip to content

Commit

Permalink
feat(client-cloudtrail): This release adds an InsufficientEncryptionP…
Browse files Browse the repository at this point in the history
…olicyException type to the StartImport endpoint
  • Loading branch information
awstools committed Feb 15, 2023
1 parent 6c94c63 commit 4253089
Show file tree
Hide file tree
Showing 4 changed files with 443 additions and 397 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const resolveClientEndpointParameters = <T>(
};

export interface EndpointParameters extends __EndpointParameters {
Region: string;
Region?: string;
UseDualStack?: boolean;
UseFIPS?: boolean;
Endpoint?: string;
Expand Down
43 changes: 22 additions & 21 deletions clients/client-cloudtrail/src/endpoint/ruleset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,27 @@ import { RuleSetObject } from "@aws-sdk/util-endpoints";
or see "smithy.rules#endpointRuleSet"
in codegen/sdk-codegen/aws-models/cloudtrail.json */

const s="fn",
t="argv",
u="ref";
const a=true,
b=false,
c="String",
d="PartitionResult",
e="tree",
f="error",
g="endpoint",
h="stringEquals",
i={"required":true,"default":false,"type":"Boolean"},
j={[u]:"Region"},
k={[u]:"Endpoint"},
l={[s]:"booleanEquals",[t]:[{[u]:"UseFIPS"},true]},
m={[s]:"booleanEquals",[t]:[{[u]:"UseDualStack"},true]},
n={},
o={[s]:"booleanEquals",[t]:[true,{[s]:"getAttr",[t]:[{[u]:d},"supportsFIPS"]}]},
p={[s]:"booleanEquals",[t]:[true,{[s]:"getAttr",[t]:[{[u]:d},"supportsDualStack"]}]},
q=[l],
const s="required",
t="fn",
u="argv",
v="ref";
const a="isSet",
b="tree",
c="error",
d="endpoint",
e="PartitionResult",
f="stringEquals",
g={[s]:false,"type":"String"},
h={[s]:true,"default":false,"type":"Boolean"},
i={[v]:"Endpoint"},
j={[t]:"booleanEquals",[u]:[{[v]:"UseFIPS"},true]},
k={[t]:"booleanEquals",[u]:[{[v]:"UseDualStack"},true]},
l={},
m={[v]:"Region"},
n={[t]:"booleanEquals",[u]:[true,{[t]:"getAttr",[u]:[{[v]:e},"supportsFIPS"]}]},
o={[t]:"booleanEquals",[u]:[true,{[t]:"getAttr",[u]:[{[v]:e},"supportsDualStack"]}]},
p=[j],
q=[k],
r=[m];
const _data={version:"1.0",parameters:{Region:{required:a,type:c},UseDualStack:i,UseFIPS:i,Endpoint:{required:b,type:c}},rules:[{conditions:[{[s]:"aws.partition",[t]:[j],assign:d}],type:e,rules:[{conditions:[{[s]:"isSet",[t]:[k]}],type:e,rules:[{conditions:q,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:f},{type:e,rules:[{conditions:r,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:f},{endpoint:{url:k,properties:n,headers:n},type:g}]}]},{conditions:[l,m],type:e,rules:[{conditions:[o,p],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://cloudtrail-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:g}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:f}]},{conditions:q,type:e,rules:[{conditions:[o],type:e,rules:[{type:e,rules:[{conditions:[{[s]:h,[t]:[j,"us-gov-east-1"]}],endpoint:{url:"https://cloudtrail.us-gov-east-1.amazonaws.com",properties:n,headers:n},type:g},{conditions:[{[s]:h,[t]:[j,"us-gov-west-1"]}],endpoint:{url:"https://cloudtrail.us-gov-west-1.amazonaws.com",properties:n,headers:n},type:g},{endpoint:{url:"https://cloudtrail-fips.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:g}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:f}]},{conditions:r,type:e,rules:[{conditions:[p],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://cloudtrail.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:g}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:f}]},{type:e,rules:[{endpoint:{url:"https://cloudtrail.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:g}]}]}]};
const _data={version:"1.0",parameters:{Region:g,UseDualStack:h,UseFIPS:h,Endpoint:g},rules:[{conditions:[{[t]:a,[u]:[i]}],type:b,rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:i,properties:l,headers:l},type:d}]}]},{type:b,rules:[{conditions:[{[t]:a,[u]:r}],type:b,rules:[{conditions:[{[t]:"aws.partition",[u]:r,assign:e}],type:b,rules:[{conditions:[j,k],type:b,rules:[{conditions:[n,o],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://cloudtrail-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:p,type:b,rules:[{conditions:[n],type:b,rules:[{type:b,rules:[{conditions:[{[t]:f,[u]:[m,"us-gov-east-1"]}],endpoint:{url:"https://cloudtrail.us-gov-east-1.amazonaws.com",properties:l,headers:l},type:d},{conditions:[{[t]:f,[u]:[m,"us-gov-west-1"]}],endpoint:{url:"https://cloudtrail.us-gov-west-1.amazonaws.com",properties:l,headers:l},type:d},{endpoint:{url:"https://cloudtrail-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:q,type:b,rules:[{conditions:[o],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://cloudtrail.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{type:b,rules:[{endpoint:{url:"https://cloudtrail.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:d}]}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}]};
export const ruleSet: RuleSetObject = _data;
3 changes: 3 additions & 0 deletions clients/client-cloudtrail/src/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3228,6 +3228,9 @@ const deserializeAws_json1_1StartImportCommandError = async (
case "InactiveEventDataStoreException":
case "com.amazonaws.cloudtrail#InactiveEventDataStoreException":
throw await deserializeAws_json1_1InactiveEventDataStoreExceptionResponse(parsedOutput, context);
case "InsufficientEncryptionPolicyException":
case "com.amazonaws.cloudtrail#InsufficientEncryptionPolicyException":
throw await deserializeAws_json1_1InsufficientEncryptionPolicyExceptionResponse(parsedOutput, context);
case "InvalidEventDataStoreCategoryException":
case "com.amazonaws.cloudtrail#InvalidEventDataStoreCategoryException":
throw await deserializeAws_json1_1InvalidEventDataStoreCategoryExceptionResponse(parsedOutput, context);
Expand Down
Loading

0 comments on commit 4253089

Please sign in to comment.