Skip to content

Commit

Permalink
feat(client-route-53-domains): Provide explanation if CheckDomainTran…
Browse files Browse the repository at this point in the history
…sferability return false. Provide requestId if a request is already submitted. Add sensitive protection for customer information
  • Loading branch information
awstools committed Aug 15, 2023
1 parent b0474f6 commit 0f396da
Show file tree
Hide file tree
Showing 7 changed files with 268 additions and 206 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {

import {
AcceptDomainTransferFromAnotherAwsAccountRequest,
AcceptDomainTransferFromAnotherAwsAccountRequestFilterSensitiveLog,
AcceptDomainTransferFromAnotherAwsAccountResponse,
} from "../models/models_0";
import {
Expand Down Expand Up @@ -150,7 +151,7 @@ export class AcceptDomainTransferFromAnotherAwsAccountCommand extends $Command<
logger,
clientName,
commandName,
inputFilterSensitiveLog: (_: any) => _,
inputFilterSensitiveLog: AcceptDomainTransferFromAnotherAwsAccountRequestFilterSensitiveLog,
outputFilterSensitiveLog: (_: any) => _,
};
const { requestHandler } = configuration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export interface CheckDomainTransferabilityCommandOutput extends CheckDomainTran
* // Transferability: { // DomainTransferability
* // Transferable: "TRANSFERABLE" || "UNTRANSFERABLE" || "DONT_KNOW" || "DOMAIN_IN_OWN_ACCOUNT" || "DOMAIN_IN_ANOTHER_ACCOUNT" || "PREMIUM_DOMAIN",
* // },
* // Message: "STRING_VALUE",
* // };
*
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ import {
SerdeContext as __SerdeContext,
} from "@smithy/types";

import { ResendContactReachabilityEmailRequest, ResendContactReachabilityEmailResponse } from "../models/models_0";
import {
ResendContactReachabilityEmailRequest,
ResendContactReachabilityEmailResponse,
ResendContactReachabilityEmailResponseFilterSensitiveLog,
} from "../models/models_0";
import {
de_ResendContactReachabilityEmailCommand,
se_ResendContactReachabilityEmailCommand,
Expand Down Expand Up @@ -135,7 +139,7 @@ export class ResendContactReachabilityEmailCommand extends $Command<
clientName,
commandName,
inputFilterSensitiveLog: (_: any) => _,
outputFilterSensitiveLog: (_: any) => _,
outputFilterSensitiveLog: ResendContactReachabilityEmailResponseFilterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
import {
TransferDomainToAnotherAwsAccountRequest,
TransferDomainToAnotherAwsAccountResponse,
TransferDomainToAnotherAwsAccountResponseFilterSensitiveLog,
} from "../models/models_0";
import {
de_TransferDomainToAnotherAwsAccountCommand,
Expand Down Expand Up @@ -163,7 +164,7 @@ export class TransferDomainToAnotherAwsAccountCommand extends $Command<
clientName,
commandName,
inputFilterSensitiveLog: (_: any) => _,
outputFilterSensitiveLog: (_: any) => _,
outputFilterSensitiveLog: TransferDomainToAnotherAwsAccountResponseFilterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
Expand Down
2 changes: 1 addition & 1 deletion clients/client-route-53-domains/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://route53domains-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://route53domains-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://route53domains.{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://route53domains.{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://route53domains-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://route53domains-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://route53domains.{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://route53domains.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"Invalid Configuration: Missing Region",type:c}]};
export const ruleSet: RuleSetObject = _data;
59 changes: 58 additions & 1 deletion clients/client-route-53-domains/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,12 @@ export class DnssecLimitExceeded extends __BaseException {
export class DuplicateRequest extends __BaseException {
readonly name: "DuplicateRequest" = "DuplicateRequest";
readonly $fault: "client" = "client";
/**
* @public
* <p>ID of the request operation.</p>
*/
requestId?: string;

/**
* @internal
*/
Expand All @@ -220,6 +226,7 @@ export class DuplicateRequest extends __BaseException {
...opts,
});
Object.setPrototypeOf(this, DuplicateRequest.prototype);
this.requestId = opts.requestId;
}
}

Expand Down Expand Up @@ -558,7 +565,7 @@ export interface DomainTransferability {
* </dd>
* <dt>DOMAIN_IN_ANOTHER_ACCOUNT</dt>
* <dd>
* <p> the domain exists in another Amazon Web Services account.</p>
* <p> The domain exists in another Amazon Web Services account.</p>
* </dd>
* <dt>PREMIUM_DOMAIN</dt>
* <dd>
Expand All @@ -580,6 +587,12 @@ export interface CheckDomainTransferabilityResponse {
* transferred to Route 53.</p>
*/
Transferability?: DomainTransferability;

/**
* @public
* <p>Provides an explanation for when a domain can't be transferred.</p>
*/
Message?: string;
}

/**
Expand Down Expand Up @@ -3897,6 +3910,16 @@ export interface ViewBillingResponse {
BillingRecords?: BillingRecord[];
}

/**
* @internal
*/
export const AcceptDomainTransferFromAnotherAwsAccountRequestFilterSensitiveLog = (
obj: AcceptDomainTransferFromAnotherAwsAccountRequest
): any => ({
...obj,
...(obj.Password && { Password: SENSITIVE_STRING }),
});

/**
* @internal
*/
Expand All @@ -3918,6 +3941,18 @@ export const ExtraParamFilterSensitiveLog = (obj: ExtraParam): any => ({
*/
export const ContactDetailFilterSensitiveLog = (obj: ContactDetail): any => ({
...obj,
...(obj.FirstName && { FirstName: SENSITIVE_STRING }),
...(obj.LastName && { LastName: SENSITIVE_STRING }),
...(obj.OrganizationName && { OrganizationName: SENSITIVE_STRING }),
...(obj.AddressLine1 && { AddressLine1: SENSITIVE_STRING }),
...(obj.AddressLine2 && { AddressLine2: SENSITIVE_STRING }),
...(obj.City && { City: SENSITIVE_STRING }),
...(obj.State && { State: SENSITIVE_STRING }),
...(obj.CountryCode && { CountryCode: SENSITIVE_STRING }),
...(obj.ZipCode && { ZipCode: SENSITIVE_STRING }),
...(obj.PhoneNumber && { PhoneNumber: SENSITIVE_STRING }),
...(obj.Email && { Email: SENSITIVE_STRING }),
...(obj.Fax && { Fax: SENSITIVE_STRING }),
...(obj.ExtraParams && { ExtraParams: obj.ExtraParams.map((item) => ExtraParamFilterSensitiveLog(item)) }),
});

Expand All @@ -3929,6 +3964,8 @@ export const GetDomainDetailResponseFilterSensitiveLog = (obj: GetDomainDetailRe
...(obj.AdminContact && { AdminContact: SENSITIVE_STRING }),
...(obj.RegistrantContact && { RegistrantContact: SENSITIVE_STRING }),
...(obj.TechContact && { TechContact: SENSITIVE_STRING }),
...(obj.AbuseContactEmail && { AbuseContactEmail: SENSITIVE_STRING }),
...(obj.AbuseContactPhone && { AbuseContactPhone: SENSITIVE_STRING }),
});

/**
Expand All @@ -3941,6 +3978,16 @@ export const RegisterDomainRequestFilterSensitiveLog = (obj: RegisterDomainReque
...(obj.TechContact && { TechContact: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const ResendContactReachabilityEmailResponseFilterSensitiveLog = (
obj: ResendContactReachabilityEmailResponse
): any => ({
...obj,
...(obj.emailAddress && { emailAddress: SENSITIVE_STRING }),
});

/**
* @internal
*/
Expand All @@ -3960,6 +4007,16 @@ export const TransferDomainRequestFilterSensitiveLog = (obj: TransferDomainReque
...(obj.TechContact && { TechContact: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const TransferDomainToAnotherAwsAccountResponseFilterSensitiveLog = (
obj: TransferDomainToAnotherAwsAccountResponse
): any => ({
...obj,
...(obj.Password && { Password: SENSITIVE_STRING }),
});

/**
* @internal
*/
Expand Down
Loading

0 comments on commit 0f396da

Please sign in to comment.