Skip to content

Commit

Permalink
feat(client-databrew): Enabled FIPS us-gov-west-1 endpoints in SDK.
Browse files Browse the repository at this point in the history
  • Loading branch information
awstools committed Jan 24, 2023
1 parent 98c0783 commit c22758d
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 97 deletions.
30 changes: 14 additions & 16 deletions clients/client-databrew/src/DataBrew.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,43 +200,41 @@ import { DataBrewClient } from "./DataBrewClient";
export class DataBrew extends DataBrewClient {
/**
* <p>Deletes one or more versions of a recipe at a time.</p>
*
* <p>The entire request will be rejected if:</p>
* <ul>
* <p>The entire request will be rejected if:</p>
* <ul>
* <li>
* <p>The recipe does not exist.</p>
* <p>The recipe does not exist.</p>
* </li>
* <li>
* <p>There is an invalid version identifier in the list of versions.</p>
* <p>There is an invalid version identifier in the list of versions.</p>
* </li>
* <li>
* <p>The version list is empty.</p>
* <p>The version list is empty.</p>
* </li>
* <li>
* <p>The version list size exceeds 50.</p>
* <p>The version list size exceeds 50.</p>
* </li>
* <li>
* <p>The version list contains duplicate entries.</p>
* <p>The version list contains duplicate entries.</p>
* </li>
* </ul>
*
* <p>The request will complete successfully, but with partial failures, if:</p>
* <ul>
* <p>The request will complete successfully, but with partial failures, if:</p>
* <ul>
* <li>
* <p>A version does not exist.</p>
* <p>A version does not exist.</p>
* </li>
* <li>
* <p>A version is being used by a job.</p>
* <p>A version is being used by a job.</p>
* </li>
* <li>
* <p>You specify <code>LATEST_WORKING</code>, but it's being used by a
* <p>You specify <code>LATEST_WORKING</code>, but it's being used by a
* project.</p>
* </li>
* <li>
* <p>The version fails to be deleted.</p>
* <p>The version fails to be deleted.</p>
* </li>
* </ul>
* <p>The <code>LATEST_WORKING</code> version will only be deleted if the recipe has no
* <p>The <code>LATEST_WORKING</code> version will only be deleted if the recipe has no
* other versions. If you try to delete <code>LATEST_WORKING</code> while other versions
* exist (or if they can't be deleted), then <code>LATEST_WORKING</code> will be listed as
* partial failure in the response.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,43 +30,41 @@ export interface BatchDeleteRecipeVersionCommandOutput extends BatchDeleteRecipe

/**
* <p>Deletes one or more versions of a recipe at a time.</p>
*
* <p>The entire request will be rejected if:</p>
* <ul>
* <p>The entire request will be rejected if:</p>
* <ul>
* <li>
* <p>The recipe does not exist.</p>
* <p>The recipe does not exist.</p>
* </li>
* <li>
* <p>There is an invalid version identifier in the list of versions.</p>
* <p>There is an invalid version identifier in the list of versions.</p>
* </li>
* <li>
* <p>The version list is empty.</p>
* <p>The version list is empty.</p>
* </li>
* <li>
* <p>The version list size exceeds 50.</p>
* <p>The version list size exceeds 50.</p>
* </li>
* <li>
* <p>The version list contains duplicate entries.</p>
* <p>The version list contains duplicate entries.</p>
* </li>
* </ul>
*
* <p>The request will complete successfully, but with partial failures, if:</p>
* <ul>
* <p>The request will complete successfully, but with partial failures, if:</p>
* <ul>
* <li>
* <p>A version does not exist.</p>
* <p>A version does not exist.</p>
* </li>
* <li>
* <p>A version is being used by a job.</p>
* <p>A version is being used by a job.</p>
* </li>
* <li>
* <p>You specify <code>LATEST_WORKING</code>, but it's being used by a
* <p>You specify <code>LATEST_WORKING</code>, but it's being used by a
* project.</p>
* </li>
* <li>
* <p>The version fails to be deleted.</p>
* <p>The version fails to be deleted.</p>
* </li>
* </ul>
* <p>The <code>LATEST_WORKING</code> version will only be deleted if the recipe has no
* <p>The <code>LATEST_WORKING</code> version will only be deleted if the recipe has no
* other versions. If you try to delete <code>LATEST_WORKING</code> while other versions
* exist (or if they can't be deleted), then <code>LATEST_WORKING</code> will be listed as
* partial failure in the response.</p>
Expand Down
2 changes: 1 addition & 1 deletion clients/client-databrew/src/endpoint/EndpointParameters.ts
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
41 changes: 21 additions & 20 deletions clients/client-databrew/src/endpoint/ruleset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,25 @@ import { RuleSetObject } from "@aws-sdk/util-endpoints";
or see "smithy.rules#endpointRuleSet"
in codegen/sdk-codegen/aws-models/databrew.json */

const p="required",
q="fn",
r="argv",
s="ref";
const a="PartitionResult",
b="tree",
c="error",
d="endpoint",
e={[p]:false,"type":"String"},
f={[p]:true,"default":false,"type":"Boolean"},
g={[s]:"Endpoint"},
h={[q]:"booleanEquals",[r]:[{[s]:"UseFIPS"},true]},
i={[q]:"booleanEquals",[r]:[{[s]:"UseDualStack"},true]},
j={},
k={[q]:"booleanEquals",[r]:[true,{[q]:"getAttr",[r]:[{[s]:a},"supportsFIPS"]}]},
l={[q]:"booleanEquals",[r]:[true,{[q]:"getAttr",[r]:[{[s]:a},"supportsDualStack"]}]},
m=[g],
n=[h],
o=[i];
const _data={version:"1.0",parameters:{Region:e,UseDualStack:f,UseFIPS:f,Endpoint:e},rules:[{conditions:[{[q]:"aws.partition",[r]:[{[s]:"Region"}],assign:a}],type:b,rules:[{conditions:[{[q]:"isSet",[r]:m},{[q]:"parseURL",[r]:m,assign:"url"}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:g,properties:j,headers:j},type:d}]}]},{conditions:[h,i],type:b,rules:[{conditions:[k,l],type:b,rules:[{endpoint:{url:"https://databrew-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:j,headers:j},type:d}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[k],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://databrew-fips.{Region}.{PartitionResult#dnsSuffix}",properties:j,headers:j},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[l],type:b,rules:[{endpoint:{url:"https://databrew.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:j,headers:j},type:d}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{endpoint:{url:"https://databrew.{Region}.{PartitionResult#dnsSuffix}",properties:j,headers:j},type:d}]}]};
const r="fn",
s="argv",
t="ref";
const a=true,
b=false,
c="String",
d="PartitionResult",
e="tree",
f="error",
g="endpoint",
h={"required":true,"default":false,"type":"Boolean"},
i={[t]:"Region"},
j={[t]:"Endpoint"},
k={[r]:"booleanEquals",[s]:[{[t]:"UseFIPS"},true]},
l={[r]:"booleanEquals",[s]:[{[t]:"UseDualStack"},true]},
m={},
n={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:d},"supportsFIPS"]}]},
o={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:d},"supportsDualStack"]}]},
p=[k],
q=[l];
const _data={version:"1.0",parameters:{Region:{required:a,type:c},UseDualStack:h,UseFIPS:h,Endpoint:{required:b,type:c}},rules:[{conditions:[{[r]:"aws.partition",[s]:[i],assign:d}],type:e,rules:[{conditions:[{[r]:"isSet",[s]:[j]}],type:e,rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:f},{type:e,rules:[{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:f},{endpoint:{url:j,properties:m,headers:m},type:g}]}]},{conditions:[k,l],type:e,rules:[{conditions:[n,o],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://databrew-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:g}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:f}]},{conditions:p,type:e,rules:[{conditions:[n],type:e,rules:[{type:e,rules:[{conditions:[{[r]:"stringEquals",[s]:[i,"us-gov-west-1"]}],endpoint:{url:"https://databrew.us-gov-west-1.amazonaws.com",properties:m,headers:m},type:g},{endpoint:{url:"https://databrew-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:g}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:f}]},{conditions:q,type:e,rules:[{conditions:[o],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://databrew.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:g}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:f}]},{type:e,rules:[{endpoint:{url:"https://databrew.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:g}]}]}]};
export const ruleSet: RuleSetObject = _data;
Loading

0 comments on commit c22758d

Please sign in to comment.