diff --git a/clients/client-grafana/src/commands/DescribeWorkspaceAuthenticationCommand.ts b/clients/client-grafana/src/commands/DescribeWorkspaceAuthenticationCommand.ts index c96c57fdd0380..f7060f3260835 100644 --- a/clients/client-grafana/src/commands/DescribeWorkspaceAuthenticationCommand.ts +++ b/clients/client-grafana/src/commands/DescribeWorkspaceAuthenticationCommand.ts @@ -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, @@ -170,7 +174,7 @@ export class DescribeWorkspaceAuthenticationCommand extends $Command< clientName, commandName, inputFilterSensitiveLog: (_: any) => _, - outputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: DescribeWorkspaceAuthenticationResponseFilterSensitiveLog, }; const { requestHandler } = configuration; return stack.resolve( diff --git a/clients/client-grafana/src/commands/UpdateWorkspaceAuthenticationCommand.ts b/clients/client-grafana/src/commands/UpdateWorkspaceAuthenticationCommand.ts index c78a75033a2ed..dbd815dcd2d47 100644 --- a/clients/client-grafana/src/commands/UpdateWorkspaceAuthenticationCommand.ts +++ b/clients/client-grafana/src/commands/UpdateWorkspaceAuthenticationCommand.ts @@ -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, @@ -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( diff --git a/clients/client-grafana/src/endpoint/ruleset.ts b/clients/client-grafana/src/endpoint/ruleset.ts index b16d5abaadb82..00d1c36b410f8 100644 --- a/clients/client-grafana/src/endpoint/ruleset.ts +++ b/clients/client-grafana/src/endpoint/ruleset.ts @@ -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; diff --git a/clients/client-grafana/src/models/models_0.ts b/clients/client-grafana/src/models/models_0.ts index ed955bc81f42f..fae7587c1eb4f 100644 --- a/clients/client-grafana/src/models/models_0.ts +++ b/clients/client-grafana/src/models/models_0.ts @@ -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 */ diff --git a/codegen/sdk-codegen/aws-models/grafana.json b/codegen/sdk-codegen/aws-models/grafana.json index c6a0eca8f0cfb..32a2bbf12ac4b 100644 --- a/codegen/sdk-codegen/aws-models/grafana.json +++ b/codegen/sdk-codegen/aws-models/grafana.json @@ -131,52 +131,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -184,13 +188,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -200,224 +213,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://grafana-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://grafana-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://grafana-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://grafana-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://grafana.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://grafana.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://grafana.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://grafana.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -2648,6 +2612,9 @@ "type": "list", "member": { "target": "com.amazonaws.grafana#RoleValue" + }, + "traits": { + "smithy.api#sensitive": {} } }, "com.amazonaws.grafana#RoleValues": { @@ -2768,7 +2735,7 @@ "traits": { "smithy.api#length": { "min": 1, - "max": 100 + "max": 5 } } }, @@ -2845,8 +2812,8 @@ }, "traits": { "smithy.api#length": { - "min": 1, - "max": 100 + "min": 2, + "max": 6 } } },