Skip to content

Commit

Permalink
feat(client-backup): Add ResourceArn, ResourceType, and BackupVaultNa…
Browse files Browse the repository at this point in the history
…me to ListRecoveryPointsByLegalHold API response.
  • Loading branch information
awstools committed May 19, 2023
1 parent 78ca401 commit 08dff77
Show file tree
Hide file tree
Showing 5 changed files with 444 additions and 282 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ export interface ListRecoveryPointsByLegalHoldCommandOutput
* // RecoveryPoints: [ // RecoveryPointsList
* // { // RecoveryPointMember
* // RecoveryPointArn: "STRING_VALUE",
* // ResourceArn: "STRING_VALUE",
* // ResourceType: "STRING_VALUE",
* // BackupVaultName: "STRING_VALUE",
* // },
* // ],
* // NextToken: "STRING_VALUE",
Expand Down
2 changes: 1 addition & 1 deletion clients/client-backup/src/endpoint/EndpointParameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const resolveClientEndpointParameters = <T>(
};

export interface EndpointParameters extends __EndpointParameters {
Region: string;
Region?: string;
UseDualStack?: boolean;
UseFIPS?: boolean;
Endpoint?: string;
Expand Down
39 changes: 20 additions & 19 deletions clients/client-backup/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/backup.json */

const q="fn",
r="argv",
s="ref";
const a=true,
b=false,
c="String",
d="PartitionResult",
e="tree",
f="error",
g="endpoint",
h={"required":true,"default":false,"type":"Boolean"},
i={[s]:"Endpoint"},
j={[q]:"booleanEquals",[r]:[{[s]:"UseFIPS"},true]},
k={[q]:"booleanEquals",[r]:[{[s]:"UseDualStack"},true]},
l={},
m={[q]:"booleanEquals",[r]:[true,{[q]:"getAttr",[r]:[{[s]:d},"supportsFIPS"]}]},
n={[q]:"booleanEquals",[r]:[true,{[q]:"getAttr",[r]:[{[s]:d},"supportsDualStack"]}]},
const q="required",
r="fn",
s="argv",
t="ref";
const a="isSet",
b="tree",
c="error",
d="endpoint",
e="PartitionResult",
f={[q]:false,"type":"String"},
g={[q]:true,"default":false,"type":"Boolean"},
h={[t]:"Endpoint"},
i={[r]:"booleanEquals",[s]:[{[t]:"UseFIPS"},true]},
j={[r]:"booleanEquals",[s]:[{[t]:"UseDualStack"},true]},
k={},
l={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsFIPS"]}]},
m={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsDualStack"]}]},
n=[i],
o=[j],
p=[k];
const _data={version:"1.0",parameters:{Region:{required:a,type:c},UseDualStack:h,UseFIPS:h,Endpoint:{required:b,type:c}},rules:[{conditions:[{[q]:"aws.partition",[r]:[{[s]:"Region"}],assign:d}],type:e,rules:[{conditions:[{[q]:"isSet",[r]:[i]}],type:e,rules:[{conditions:o,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:f},{type:e,rules:[{conditions:p,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:f},{endpoint:{url:i,properties:l,headers:l},type:g}]}]},{conditions:[j,k],type:e,rules:[{conditions:[m,n],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://backup-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:g}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:f}]},{conditions:o,type:e,rules:[{conditions:[m],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://backup-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:g}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:f}]},{conditions:p,type:e,rules:[{conditions:[n],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://backup.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:g}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:f}]},{type:e,rules:[{endpoint:{url:"https://backup.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:g}]}]}]};
p=[{[t]:"Region"}];
const _data={version:"1.0",parameters:{Region:f,UseDualStack:g,UseFIPS:g,Endpoint:f},rules:[{conditions:[{[r]:a,[s]:[h]}],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:h,properties:k,headers:k},type:d}]}]},{type:b,rules:[{conditions:[{[r]:a,[s]:p}],type:b,rules:[{conditions:[{[r]:"aws.partition",[s]:p,assign:e}],type:b,rules:[{conditions:[i,j],type:b,rules:[{conditions:[l,m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://backup-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},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:[l],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://backup-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://backup.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{type:b,rules:[{endpoint:{url:"https://backup.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}]};
export const ruleSet: RuleSetObject = _data;
51 changes: 51 additions & 0 deletions clients/client-backup/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,13 @@ export interface BackupRule {
* <p>A value in minutes after a backup is scheduled before a job will be canceled if it
* doesn't start successfully. This value is optional.
* If this value is included, it must be at least 60 minutes to avoid errors.</p>
* <p>During the start window, the backup job status remains in <code>CREATED</code> status until it
* has successfully begun or until the start window time has run out. If within the start
* window time Backup receives an error that allows the job to be retried,
* Backup will automatically retry to begin the job at least every 10 minutes
* until the backup
* successfully begins (the job status changes to <code>RUNNING</code>) or until the job status
* changes to <code>EXPIRED</code> (which is expected to occur when the start window time is over).</p>
*/
StartWindowMinutes?: number;

Expand Down Expand Up @@ -480,6 +487,13 @@ export interface BackupRuleInput {
* <p>A value in minutes after a backup is scheduled before a job will be canceled if it
* doesn't start successfully. This value is optional.
* If this value is included, it must be at least 60 minutes to avoid errors.</p>
* <p>During the start window, the backup job status remains in <code>CREATED</code> status until it
* has successfully begun or until the start window time has run out. If within the start
* window time Backup receives an error that allows the job to be retried,
* Backup will automatically retry to begin the job at least every 10 minutes
* until the backup
* successfully begins (the job status changes to <code>RUNNING</code>) or until the job status
* changes to <code>EXPIRED</code> (which is expected to occur when the start window time is over).</p>
*/
StartWindowMinutes?: number;

Expand Down Expand Up @@ -4745,6 +4759,24 @@ export interface RecoveryPointMember {
* recovery point.</p>
*/
RecoveryPointArn?: string;

/**
* <p>This is the Amazon Resource Name (ARN) that uniquely identifies
* a saved resource.</p>
*/
ResourceArn?: string;

/**
* <p>This is the Amazon Web Services resource type that is saved as
* a recovery point.</p>
*/
ResourceType?: string;

/**
* <p>This is the name of the backup vault
* (the logical container in which backups are stored).</p>
*/
BackupVaultName?: string;
}

/**
Expand Down Expand Up @@ -5350,6 +5382,13 @@ export interface StartBackupJobInput {
* <p>A value in minutes after a backup is scheduled before a job will be canceled if it
* doesn't start successfully. This value is optional, and the default is 8 hours.
* If this value is included, it must be at least 60 minutes to avoid errors.</p>
* <p>During the start window, the backup job status remains in <code>CREATED</code> status until it
* has successfully begun or until the start window time has run out. If within the start
* window time Backup receives an error that allows the job to be retried,
* Backup will automatically retry to begin the job at least every 10 minutes
* until the backup
* successfully begins (the job status changes to <code>RUNNING</code>) or until the job status
* changes to <code>EXPIRED</code> (which is expected to occur when the start window time is over).</p>
*/
StartWindowMinutes?: number;

Expand Down Expand Up @@ -5622,6 +5661,10 @@ export interface StartRestoreJobInput {
* </li>
* <li>
* <p>
* <code>CloudFormation</code> for CloudFormation</p>
* </li>
* <li>
* <p>
* <code>DynamoDB</code> for Amazon DynamoDB</p>
* </li>
* <li>
Expand Down Expand Up @@ -5650,6 +5693,10 @@ export interface StartRestoreJobInput {
* </li>
* <li>
* <p>
* <code>Redshift</code> for Amazon Redshift</p>
* </li>
* <li>
* <p>
* <code>Storage Gateway</code> for Storage Gateway</p>
* </li>
* <li>
Expand All @@ -5658,6 +5705,10 @@ export interface StartRestoreJobInput {
* </li>
* <li>
* <p>
* <code>Timestream</code> for Amazon Timestream</p>
* </li>
* <li>
* <p>
* <code>VirtualMachine</code> for virtual machines</p>
* </li>
* </ul>
Expand Down
Loading

0 comments on commit 08dff77

Please sign in to comment.