Skip to content

Commit

Permalink
feat(client-grafana): Marking SAML RoleValues attribute as sensitive …
Browse files Browse the repository at this point in the history
…and updating VpcConfiguration attributes to match documentation.
  • Loading branch information
awstools committed Aug 31, 2023
1 parent 2263b20 commit 7e05d81
Show file tree
Hide file tree
Showing 5 changed files with 239 additions and 199 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ import {
} from "@smithy/types";

import { GrafanaClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GrafanaClient";
import { DescribeWorkspaceAuthenticationRequest, DescribeWorkspaceAuthenticationResponse } from "../models/models_0";
import {
DescribeWorkspaceAuthenticationRequest,
DescribeWorkspaceAuthenticationResponse,
DescribeWorkspaceAuthenticationResponseFilterSensitiveLog,
} from "../models/models_0";
import {
de_DescribeWorkspaceAuthenticationCommand,
se_DescribeWorkspaceAuthenticationCommand,
Expand Down Expand Up @@ -170,7 +174,7 @@ export class DescribeWorkspaceAuthenticationCommand extends $Command<
clientName,
commandName,
inputFilterSensitiveLog: (_: any) => _,
outputFilterSensitiveLog: (_: any) => _,
outputFilterSensitiveLog: DescribeWorkspaceAuthenticationResponseFilterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ import {
} from "@smithy/types";

import { GrafanaClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GrafanaClient";
import { UpdateWorkspaceAuthenticationRequest, UpdateWorkspaceAuthenticationResponse } from "../models/models_0";
import {
UpdateWorkspaceAuthenticationRequest,
UpdateWorkspaceAuthenticationRequestFilterSensitiveLog,
UpdateWorkspaceAuthenticationResponse,
UpdateWorkspaceAuthenticationResponseFilterSensitiveLog,
} from "../models/models_0";
import {
de_UpdateWorkspaceAuthenticationCommand,
se_UpdateWorkspaceAuthenticationCommand,
Expand Down Expand Up @@ -207,8 +212,8 @@ export class UpdateWorkspaceAuthenticationCommand extends $Command<
logger,
clientName,
commandName,
inputFilterSensitiveLog: (_: any) => _,
outputFilterSensitiveLog: (_: any) => _,
inputFilterSensitiveLog: UpdateWorkspaceAuthenticationRequestFilterSensitiveLog,
outputFilterSensitiveLog: UpdateWorkspaceAuthenticationResponseFilterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
Expand Down
2 changes: 1 addition & 1 deletion clients/client-grafana/src/endpoint/ruleset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ 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},{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}]}]};
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}]};
export const ruleSet: RuleSetObject = _data;
64 changes: 64 additions & 0 deletions clients/client-grafana/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2166,6 +2166,70 @@ export const AssociateLicenseResponseFilterSensitiveLog = (obj: AssociateLicense
...(obj.workspace && { workspace: WorkspaceDescriptionFilterSensitiveLog(obj.workspace) }),
});

/**
* @internal
*/
export const RoleValuesFilterSensitiveLog = (obj: RoleValues): any => ({
...obj,
...(obj.editor && { editor: SENSITIVE_STRING }),
...(obj.admin && { admin: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const SamlConfigurationFilterSensitiveLog = (obj: SamlConfiguration): any => ({
...obj,
...(obj.idpMetadata && { idpMetadata: obj.idpMetadata }),
...(obj.roleValues && { roleValues: RoleValuesFilterSensitiveLog(obj.roleValues) }),
});

/**
* @internal
*/
export const SamlAuthenticationFilterSensitiveLog = (obj: SamlAuthentication): any => ({
...obj,
...(obj.configuration && { configuration: SamlConfigurationFilterSensitiveLog(obj.configuration) }),
});

/**
* @internal
*/
export const AuthenticationDescriptionFilterSensitiveLog = (obj: AuthenticationDescription): any => ({
...obj,
...(obj.saml && { saml: SamlAuthenticationFilterSensitiveLog(obj.saml) }),
});

/**
* @internal
*/
export const DescribeWorkspaceAuthenticationResponseFilterSensitiveLog = (
obj: DescribeWorkspaceAuthenticationResponse
): any => ({
...obj,
...(obj.authentication && { authentication: AuthenticationDescriptionFilterSensitiveLog(obj.authentication) }),
});

/**
* @internal
*/
export const UpdateWorkspaceAuthenticationRequestFilterSensitiveLog = (
obj: UpdateWorkspaceAuthenticationRequest
): any => ({
...obj,
...(obj.samlConfiguration && { samlConfiguration: SamlConfigurationFilterSensitiveLog(obj.samlConfiguration) }),
});

/**
* @internal
*/
export const UpdateWorkspaceAuthenticationResponseFilterSensitiveLog = (
obj: UpdateWorkspaceAuthenticationResponse
): any => ({
...obj,
...(obj.authentication && { authentication: AuthenticationDescriptionFilterSensitiveLog(obj.authentication) }),
});

/**
* @internal
*/
Expand Down
Loading

0 comments on commit 7e05d81

Please sign in to comment.