Skip to content

Commit 7e05d81

Browse files
author
awstools
committed
feat(client-grafana): Marking SAML RoleValues attribute as sensitive and updating VpcConfiguration attributes to match documentation.
1 parent 2263b20 commit 7e05d81

File tree

5 files changed

+239
-199
lines changed

5 files changed

+239
-199
lines changed

clients/client-grafana/src/commands/DescribeWorkspaceAuthenticationCommand.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ import {
1414
} from "@smithy/types";
1515

1616
import { GrafanaClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GrafanaClient";
17-
import { DescribeWorkspaceAuthenticationRequest, DescribeWorkspaceAuthenticationResponse } from "../models/models_0";
17+
import {
18+
DescribeWorkspaceAuthenticationRequest,
19+
DescribeWorkspaceAuthenticationResponse,
20+
DescribeWorkspaceAuthenticationResponseFilterSensitiveLog,
21+
} from "../models/models_0";
1822
import {
1923
de_DescribeWorkspaceAuthenticationCommand,
2024
se_DescribeWorkspaceAuthenticationCommand,
@@ -170,7 +174,7 @@ export class DescribeWorkspaceAuthenticationCommand extends $Command<
170174
clientName,
171175
commandName,
172176
inputFilterSensitiveLog: (_: any) => _,
173-
outputFilterSensitiveLog: (_: any) => _,
177+
outputFilterSensitiveLog: DescribeWorkspaceAuthenticationResponseFilterSensitiveLog,
174178
};
175179
const { requestHandler } = configuration;
176180
return stack.resolve(

clients/client-grafana/src/commands/UpdateWorkspaceAuthenticationCommand.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ import {
1414
} from "@smithy/types";
1515

1616
import { GrafanaClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GrafanaClient";
17-
import { UpdateWorkspaceAuthenticationRequest, UpdateWorkspaceAuthenticationResponse } from "../models/models_0";
17+
import {
18+
UpdateWorkspaceAuthenticationRequest,
19+
UpdateWorkspaceAuthenticationRequestFilterSensitiveLog,
20+
UpdateWorkspaceAuthenticationResponse,
21+
UpdateWorkspaceAuthenticationResponseFilterSensitiveLog,
22+
} from "../models/models_0";
1823
import {
1924
de_UpdateWorkspaceAuthenticationCommand,
2025
se_UpdateWorkspaceAuthenticationCommand,
@@ -207,8 +212,8 @@ export class UpdateWorkspaceAuthenticationCommand extends $Command<
207212
logger,
208213
clientName,
209214
commandName,
210-
inputFilterSensitiveLog: (_: any) => _,
211-
outputFilterSensitiveLog: (_: any) => _,
215+
inputFilterSensitiveLog: UpdateWorkspaceAuthenticationRequestFilterSensitiveLog,
216+
outputFilterSensitiveLog: UpdateWorkspaceAuthenticationResponseFilterSensitiveLog,
212217
};
213218
const { requestHandler } = configuration;
214219
return stack.resolve(

clients/client-grafana/src/endpoint/ruleset.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ m={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsDualStack"
2626
n=[i],
2727
o=[j],
2828
p=[{[t]:"Region"}];
29-
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://grafana-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://grafana-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://grafana.{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://grafana.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}]};
29+
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://grafana-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://grafana-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://grafana.{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://grafana.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"Invalid Configuration: Missing Region",type:c}]};
3030
export const ruleSet: RuleSetObject = _data;

clients/client-grafana/src/models/models_0.ts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2166,6 +2166,70 @@ export const AssociateLicenseResponseFilterSensitiveLog = (obj: AssociateLicense
21662166
...(obj.workspace && { workspace: WorkspaceDescriptionFilterSensitiveLog(obj.workspace) }),
21672167
});
21682168

2169+
/**
2170+
* @internal
2171+
*/
2172+
export const RoleValuesFilterSensitiveLog = (obj: RoleValues): any => ({
2173+
...obj,
2174+
...(obj.editor && { editor: SENSITIVE_STRING }),
2175+
...(obj.admin && { admin: SENSITIVE_STRING }),
2176+
});
2177+
2178+
/**
2179+
* @internal
2180+
*/
2181+
export const SamlConfigurationFilterSensitiveLog = (obj: SamlConfiguration): any => ({
2182+
...obj,
2183+
...(obj.idpMetadata && { idpMetadata: obj.idpMetadata }),
2184+
...(obj.roleValues && { roleValues: RoleValuesFilterSensitiveLog(obj.roleValues) }),
2185+
});
2186+
2187+
/**
2188+
* @internal
2189+
*/
2190+
export const SamlAuthenticationFilterSensitiveLog = (obj: SamlAuthentication): any => ({
2191+
...obj,
2192+
...(obj.configuration && { configuration: SamlConfigurationFilterSensitiveLog(obj.configuration) }),
2193+
});
2194+
2195+
/**
2196+
* @internal
2197+
*/
2198+
export const AuthenticationDescriptionFilterSensitiveLog = (obj: AuthenticationDescription): any => ({
2199+
...obj,
2200+
...(obj.saml && { saml: SamlAuthenticationFilterSensitiveLog(obj.saml) }),
2201+
});
2202+
2203+
/**
2204+
* @internal
2205+
*/
2206+
export const DescribeWorkspaceAuthenticationResponseFilterSensitiveLog = (
2207+
obj: DescribeWorkspaceAuthenticationResponse
2208+
): any => ({
2209+
...obj,
2210+
...(obj.authentication && { authentication: AuthenticationDescriptionFilterSensitiveLog(obj.authentication) }),
2211+
});
2212+
2213+
/**
2214+
* @internal
2215+
*/
2216+
export const UpdateWorkspaceAuthenticationRequestFilterSensitiveLog = (
2217+
obj: UpdateWorkspaceAuthenticationRequest
2218+
): any => ({
2219+
...obj,
2220+
...(obj.samlConfiguration && { samlConfiguration: SamlConfigurationFilterSensitiveLog(obj.samlConfiguration) }),
2221+
});
2222+
2223+
/**
2224+
* @internal
2225+
*/
2226+
export const UpdateWorkspaceAuthenticationResponseFilterSensitiveLog = (
2227+
obj: UpdateWorkspaceAuthenticationResponse
2228+
): any => ({
2229+
...obj,
2230+
...(obj.authentication && { authentication: AuthenticationDescriptionFilterSensitiveLog(obj.authentication) }),
2231+
});
2232+
21692233
/**
21702234
* @internal
21712235
*/

0 commit comments

Comments
 (0)