Skip to content

Commit

Permalink
feat(client-route53-recovery-cluster): Adds Owner field to ListRoutin…
Browse files Browse the repository at this point in the history
…gControls API.
  • Loading branch information
awstools committed Oct 17, 2023
1 parent 81747e4 commit 375efbf
Show file tree
Hide file tree
Showing 11 changed files with 95 additions and 69 deletions.
2 changes: 1 addition & 1 deletion clients/client-route53-recovery-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ recover applications by rerouting traffic across
Availability Zones or Amazon Web Services Regions. Routing controls are simple on/off switches hosted
on a highly available cluster in Route 53 ARC. A cluster provides a set of five redundant Regional endpoints against which you
can run API calls to get or update the state of routing controls. To implement failover, you set
one routing control On and another one Off, to reroute traffic from one Availability Zone or Amazon Web Services Region
one routing control to ON and another one to OFF, to reroute traffic from one Availability Zone or Amazon Web Services Region
to another. </p>
<p>
<i>Be aware that you must specify a Regional endpoint for a cluster when you work with API cluster operations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export interface Route53RecoveryCluster {
* Availability Zones or Amazon Web Services Regions. Routing controls are simple on/off switches hosted
* on a highly available cluster in Route 53 ARC. A cluster provides a set of five redundant Regional endpoints against which you
* can run API calls to get or update the state of routing controls. To implement failover, you set
* one routing control On and another one Off, to reroute traffic from one Availability Zone or Amazon Web Services Region
* one routing control to ON and another one to OFF, to reroute traffic from one Availability Zone or Amazon Web Services Region
* to another. </p>
* <p>
* <i>Be aware that you must specify a Regional endpoint for a cluster when you work with API cluster operations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export interface Route53RecoveryClusterClientResolvedConfig extends Route53Recov
* Availability Zones or Amazon Web Services Regions. Routing controls are simple on/off switches hosted
* on a highly available cluster in Route 53 ARC. A cluster provides a set of five redundant Regional endpoints against which you
* can run API calls to get or update the state of routing controls. To implement failover, you set
* one routing control On and another one Off, to reroute traffic from one Availability Zone or Amazon Web Services Region
* one routing control to ON and another one to OFF, to reroute traffic from one Availability Zone or Amazon Web Services Region
* to another. </p>
* <p>
* <i>Be aware that you must specify a Regional endpoint for a cluster when you work with API cluster operations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ export interface GetRoutingControlStateCommandOutput extends GetRoutingControlSt
/**
* @public
* <p>Get the state for a routing control. A routing control is a simple on/off switch that you
* can use to route traffic to cells. When a routing control state is On, traffic flows to a cell. When
* the state is Off, traffic does not flow. </p>
* can use to route traffic to cells. When a routing control state is set to ON, traffic flows to a cell. When
* the state is set to OFF, traffic does not flow. </p>
* <p>Before you can create a routing control, you must first create a cluster, and then host the control
* in a control panel on the cluster. For more information, see <a href="https://docs.aws.amazon.com/r53recovery/latest/dg/routing-control.create.html">
* Create routing control structures</a> in the Amazon Route 53 Application Recovery Controller Developer Guide.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export interface ListRoutingControlsCommandOutput extends ListRoutingControlsRes
* If you specify a control panel ARN, this call lists the routing controls in the control panel. Otherwise, it lists
* all the routing controls in the cluster.</p>
* <p>A routing control is a simple on/off switch in Route 53 ARC that you
* can use to route traffic to cells. When a routing control state is On, traffic flows to a cell. When
* the state is Off, traffic does not flow.</p>
* can use to route traffic to cells. When a routing control state is set to ON, traffic flows to a cell. When
* the state is set to OFF, traffic does not flow.</p>
* <p>Before you can create a routing control, you must first create a cluster, and then host the control
* in a control panel on the cluster. For more information, see <a href="https://docs.aws.amazon.com/r53recovery/latest/dg/routing-control.create.html">
* Create routing control structures</a> in the Amazon Route 53 Application Recovery Controller Developer Guide.
Expand Down Expand Up @@ -94,6 +94,7 @@ export interface ListRoutingControlsCommandOutput extends ListRoutingControlsRes
* // RoutingControlArn: "STRING_VALUE",
* // RoutingControlName: "STRING_VALUE",
* // RoutingControlState: "On" || "Off",
* // Owner: "STRING_VALUE",
* // },
* // ],
* // NextToken: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export interface UpdateRoutingControlStateCommandOutput extends UpdateRoutingCon

/**
* @public
* <p>Set the state of the routing control to reroute traffic. You can set the value to be On or
* Off. When the state is On, traffic flows to a cell. When the state is Off, traffic does not
* <p>Set the state of the routing control to reroute traffic. You can set the value to ON or
* OFF. When the state is ON, traffic flows to a cell. When the state is OFF, traffic does not
* flow.</p>
* <p>With Route 53 ARC, you can add safety rules for routing controls, which are safeguards for routing
* control state updates that help prevent unexpected outcomes, like fail open traffic routing. However,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export interface UpdateRoutingControlStatesCommandOutput extends UpdateRoutingCo

/**
* @public
* <p>Set multiple routing control states. You can set the value for each state to be On or Off.
* When the state is On, traffic flows to a cell. When it's Off, traffic does not
* <p>Set multiple routing control states. You can set the value for each state to be ON or OFF.
* When the state is ON, traffic flows to a cell. When it's OFF, traffic does not
* flow.</p>
* <p>With Route 53 ARC, you can add safety rules for routing controls, which are safeguards for routing
* control state updates that help prevent unexpected outcomes, like fail open traffic routing. However,
Expand Down
44 changes: 23 additions & 21 deletions clients/client-route53-recovery-cluster/src/endpoint/ruleset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,27 @@ import { RuleSetObject } from "@smithy/types";
or see "smithy.rules#endpointRuleSet"
in codegen/sdk-codegen/aws-models/route53-recovery-cluster.json */

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=[{[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},{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:h,properties:k,headers:k},type:d}]},{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:[{endpoint:{url:"https://route53-recovery-cluster-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:[{endpoint:{url:"https://route53-recovery-cluster-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:[{endpoint:{url:"https://route53-recovery-cluster.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{endpoint:{url:"https://route53-recovery-cluster.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"Invalid Configuration: Missing Region",type:c}]};
const s="required",
t="fn",
u="argv",
v="ref";
const a=true,
b="isSet",
c="booleanEquals",
d="error",
e="endpoint",
f="tree",
g="PartitionResult",
h={[s]:false,"type":"String"},
i={[s]:true,"default":false,"type":"Boolean"},
j={[v]:"Endpoint"},
k={[t]:c,[u]:[{[v]:"UseFIPS"},true]},
l={[t]:c,[u]:[{[v]:"UseDualStack"},true]},
m={},
n={[t]:"getAttr",[u]:[{[v]:g},"supportsFIPS"]},
o={[t]:c,[u]:[true,{[t]:"getAttr",[u]:[{[v]:g},"supportsDualStack"]}]},
p=[k],
q=[l],
r=[{[v]:"Region"}];
const _data={version:"1.0",parameters:{Region:h,UseDualStack:i,UseFIPS:i,Endpoint:h},rules:[{conditions:[{[t]:b,[u]:[j]}],rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:j,properties:m,headers:m},type:e}],type:f},{conditions:[{[t]:b,[u]:r}],rules:[{conditions:[{[t]:"aws.partition",[u]:r,assign:g}],rules:[{conditions:[k,l],rules:[{conditions:[{[t]:c,[u]:[a,n]},o],rules:[{endpoint:{url:"https://route53-recovery-cluster-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:p,rules:[{conditions:[{[t]:c,[u]:[n,a]}],rules:[{endpoint:{url:"https://route53-recovery-cluster-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:q,rules:[{conditions:[o],rules:[{endpoint:{url:"https://route53-recovery-cluster.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{endpoint:{url:"https://route53-recovery-cluster.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}]};
export const ruleSet: RuleSetObject = _data;
2 changes: 1 addition & 1 deletion clients/client-route53-recovery-cluster/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Availability Zones or Amazon Web Services Regions. Routing controls are simple on/off switches hosted
* on a highly available cluster in Route 53 ARC. A cluster provides a set of five redundant Regional endpoints against which you
* can run API calls to get or update the state of routing controls. To implement failover, you set
* one routing control On and another one Off, to reroute traffic from one Availability Zone or Amazon Web Services Region
* one routing control to ON and another one to OFF, to reroute traffic from one Availability Zone or Amazon Web Services Region
* to another. </p>
* <p>
* <i>Be aware that you must specify a Regional endpoint for a cluster when you work with API cluster operations
Expand Down
19 changes: 13 additions & 6 deletions clients/client-route53-recovery-cluster/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@ export interface ListRoutingControlsRequest {
/**
* @public
* <p>A routing control, which is a simple on/off switch that you
* can use to route traffic to cells. When a routing control state is On, traffic flows to a cell. When
* the state is Off, traffic does not flow. </p>
* can use to route traffic to cells. When a routing control state is set to ON, traffic flows to a cell. When
* the state is set to OFF, traffic does not flow. </p>
*/
export interface RoutingControl {
/**
Expand All @@ -319,7 +319,8 @@ export interface RoutingControl {

/**
* @public
* <p>The name of the control panel where the routing control is located.</p>
* <p>The name of the control panel where the routing control is located. Only ASCII characters are supported for control
* panel names.</p>
*/
ControlPanelName?: string;

Expand All @@ -337,10 +338,16 @@ export interface RoutingControl {

/**
* @public
* <p>The current state of the routing control. When a routing control state is On, traffic flows to a cell. When
* the state is Off, traffic does not flow. </p>
* <p>The current state of the routing control. When a routing control state is set to ON, traffic flows to a cell. When
* the state is set to OFF, traffic does not flow. </p>
*/
RoutingControlState?: RoutingControlState;

/**
* @public
* <p>The Amazon Web Services account ID of the routing control owner.</p>
*/
Owner?: string;
}

/**
Expand Down Expand Up @@ -420,7 +427,7 @@ export interface UpdateRoutingControlStateRequest {

/**
* @public
* <p>The state of the routing control. You can set the value to be On or Off.</p>
* <p>The state of the routing control. You can set the value to ON or OFF.</p>
*/
RoutingControlState: RoutingControlState | undefined;

Expand Down
Loading

0 comments on commit 375efbf

Please sign in to comment.