Skip to content

Commit

Permalink
feat(client-workspaces): Added new field "reason" to OperationNotSupp…
Browse files Browse the repository at this point in the history
…ortedException. Receiving this exception in the DeregisterWorkspaceDirectory API will now return a reason giving more context on the failure.
  • Loading branch information
awstools committed Jun 15, 2022
1 parent 02083d6 commit 3fb0a96
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 43 deletions.
63 changes: 31 additions & 32 deletions clients/client-workspaces/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ export class InvalidResourceStateException extends __BaseException {
export class OperationNotSupportedException extends __BaseException {
readonly name: "OperationNotSupportedException" = "OperationNotSupportedException";
readonly $fault: "client" = "client";
/**
* <p>The exception error reason.</p>
*/
reason?: string;

/**
* @internal
*/
Expand All @@ -182,6 +187,7 @@ export class OperationNotSupportedException extends __BaseException {
...opts,
});
Object.setPrototypeOf(this, OperationNotSupportedException.prototype);
this.reason = opts.reason;
}
}

Expand Down Expand Up @@ -1463,8 +1469,8 @@ export enum DedicatedTenancySupportEnum {
*/
export interface DefaultClientBrandingAttributes {
/**
* <p>The logo URL. This is the link where users can download the logo image. The only
* supported image format is <code>.png</code>.</p>
* <p>The logo URL. The only image
* format accepted is a binary data object that is converted from a <code>.png</code> file.</p>
*/
LogoUrl?: string;

Expand Down Expand Up @@ -1536,8 +1542,8 @@ export namespace DefaultClientBrandingAttributes {
*/
export interface DefaultImportClientBrandingAttributes {
/**
* <p>The logo. This is the link where users can download the logo image. The only image
* format accepted is <code>.png</code>.</p>
* <p>The logo. The only image
* format accepted is a binary data object that is converted from a <code>.png</code> file.</p>
*/
Logo?: Uint8Array;

Expand Down Expand Up @@ -1995,15 +2001,17 @@ export namespace DescribeClientBrandingRequest {
*/
export interface IosClientBrandingAttributes {
/**
* <p>The logo. This is the link where users can download the logo image. This is the
* <p>The logo. This is the
* standard-resolution display that has a 1:1 pixel density (or @1x), where one pixel is equal
* to one point.</p>
* to one point. The only image format accepted is a binary data object that is converted from
* a <code>.png</code> file.</p>
*/
LogoUrl?: string;

/**
* <p>The @2x version of the logo. This is the higher resolution display that offers a scale
* factor of 2.0 (or @2x).</p>
* factor of 2.0 (or @2x). The only image format accepted is a binary data object that is
* converted from a <code>.png</code> file.</p>
* <note>
* <p> For more information about iOS image size and resolution, see <a href="https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/image-size-and-resolution/">Image Size and Resolution </a> in the <i>Apple Human Interface
* Guidelines</i>.</p>
Expand All @@ -2013,7 +2021,8 @@ export interface IosClientBrandingAttributes {

/**
* <p>The @3x version of the logo. This is the higher resolution display that offers a scale
* factor of 3.0 (or @3x).</p>
* factor of 3.0 (or @3x).The only image format accepted is a binary data object that is
* converted from a <code>.png</code> file.</p>
* <note>
* <p> For more information about iOS image size and resolution, see <a href="https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/image-size-and-resolution/">Image Size and Resolution </a> in the <i>Apple Human Interface
* Guidelines</i>.</p>
Expand Down Expand Up @@ -3330,15 +3339,17 @@ export namespace FailedWorkspaceChangeRequest {
*/
export interface IosImportClientBrandingAttributes {
/**
* <p>The logo. This is the link where users can download the logo image. This is the
* <p>The logo. This is the
* standard-resolution display that has a 1:1 pixel density (or @1x), where one pixel is equal
* to one point.</p>
* to one point. The only image format accepted is a binary data object that is converted
* from a <code>.png</code> file.</p>
*/
Logo?: Uint8Array;

/**
* <p>The @2x version of the logo. This is the higher resolution display that offers a scale
* factor of 2.0 (or @2x).</p>
* factor of 2.0 (or @2x). The only image format accepted is a binary data object that is
* converted from a <code>.png</code> file.</p>
* <note>
* <p> For more information about iOS image size and resolution, see <a href="https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/image-size-and-resolution/">Image Size and Resolution </a> in the <i>Apple Human Interface
* Guidelines</i>.</p>
Expand All @@ -3348,7 +3359,8 @@ export interface IosImportClientBrandingAttributes {

/**
* <p>The @3x version of the logo. This is the higher resolution display that offers a scale
* factor of 3.0 (or @3x).</p>
* factor of 3.0 (or @3x). The only image format accepted is a binary data object that is
* converted from a <code>.png</code> file.</p>
* <note>
* <p> For more information about iOS image size and resolution, see <a href="https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/image-size-and-resolution/">Image Size and Resolution </a> in the <i>Apple Human Interface
* Guidelines</i>.</p>
Expand Down Expand Up @@ -3518,17 +3530,12 @@ export interface ImportWorkspaceImageRequest {

/**
* <p>The ingestion process to be used when importing the image, depending on which protocol
* you want to use for your BYOL Workspace image, either PCoIP or WorkSpaces Streaming Protocol
* (WSP). To use WSP, specify a value that ends in <code>_WSP</code>. To use PCoIP, specify a value
* that does not end in <code>_WSP</code>. </p>
*
* <p>For non-GPU-enabled images (bundles other than Graphics.g4dn, GraphicsPro.g4dn, Graphics,
* or GraphicsPro), specify <code>BYOL_REGULAR</code> or <code>BYOL_REGULAR_WSP</code>, depending
* on the protocol.</p>
* <note>
* <p>Use <code>BYOL_GRAPHICS_G4DN</code> ingestion for both Graphics.g4dn and
* GraphicsPro.g4dn.</p>
* </note>
* you want to use for your BYOL Workspace image, either PCoIP or WorkSpaces Streaming
* Protocol (WSP). To use WSP, specify a value that ends in <code>_WSP</code>. To use PCoIP,
* specify a value that does not end in <code>_WSP</code>. </p>
* <p>For non-GPU-enabled bundles (bundles other than Graphics or GraphicsPro), specify
* <code>BYOL_REGULAR</code> or <code>BYOL_REGULAR_WSP</code>, depending on the
* protocol.</p>
*/
IngestionProcess: WorkspaceImageIngestionProcess | string | undefined;

Expand All @@ -3552,15 +3559,7 @@ export interface ImportWorkspaceImageRequest {
* BYOL images. For more information about subscribing to Office for BYOL images, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/byol-windows-images.html"> Bring
* Your Own Windows Desktop Licenses</a>.</p>
* <note>
* <ul>
* <li>
* <p>Although this parameter is an array, only one item is allowed at this time</p>
* </li>
* <li>
* <p>Microsoft Office 2016 application subscription through AWS is currently not supported
* for Graphics.g4dn Bring Your Own License (BYOL) images</p>
* </li>
* </ul>
* <p>Although this parameter is an array, only one item is allowed at this time.</p>
* </note>
*/
Applications?: (Application | string)[];
Expand Down
1 change: 1 addition & 0 deletions clients/client-workspaces/src/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6545,6 +6545,7 @@ const deserializeAws_json1_1OperationNotSupportedException = (
): OperationNotSupportedException => {
return {
message: __expectString(output.message),
reason: __expectString(output.reason),
} as any;
};

Expand Down
34 changes: 23 additions & 11 deletions codegen/sdk-codegen/aws-models/workspaces.json
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,7 @@
"LogoUrl": {
"target": "com.amazonaws.workspaces#ClientUrl",
"traits": {
"smithy.api#documentation": "<p>The logo URL. This is the link where users can download the logo image. The only\n supported image format is <code>.png</code>.</p>"
"smithy.api#documentation": "<p>The logo URL. The only image \n format accepted is a binary data object that is converted from a <code>.png</code> file.</p>"
}
},
"SupportEmail": {
Expand Down Expand Up @@ -1478,7 +1478,7 @@
"Logo": {
"target": "com.amazonaws.workspaces#DefaultLogo",
"traits": {
"smithy.api#documentation": "<p>The logo. This is the link where users can download the logo image. The only image\n format accepted is <code>.png</code>.</p>"
"smithy.api#documentation": "<p>The logo. The only image \n format accepted is a binary data object that is converted from a <code>.png</code> file.</p>"
}
},
"SupportEmail": {
Expand Down Expand Up @@ -3014,6 +3014,9 @@
"com.amazonaws.workspaces#ErrorType": {
"type": "string"
},
"com.amazonaws.workspaces#ExceptionErrorCode": {
"type": "string"
},
"com.amazonaws.workspaces#ExceptionMessage": {
"type": "string"
},
Expand Down Expand Up @@ -3297,7 +3300,7 @@
"IngestionProcess": {
"target": "com.amazonaws.workspaces#WorkspaceImageIngestionProcess",
"traits": {
"smithy.api#documentation": "<p>The ingestion process to be used when importing the image, depending on which protocol \n you want to use for your BYOL Workspace image, either PCoIP or WorkSpaces Streaming Protocol \n (WSP). To use WSP, specify a value that ends in <code>_WSP</code>. To use PCoIP, specify a value \n that does not end in <code>_WSP</code>. </p>\n \n <p>For non-GPU-enabled images (bundles other than Graphics.g4dn, GraphicsPro.g4dn, Graphics, \n or GraphicsPro), specify <code>BYOL_REGULAR</code> or <code>BYOL_REGULAR_WSP</code>, depending\n on the protocol.</p>\n <note>\n <p>Use <code>BYOL_GRAPHICS_G4DN</code> ingestion for both Graphics.g4dn and\n GraphicsPro.g4dn.</p>\n </note>",
"smithy.api#documentation": "<p>The ingestion process to be used when importing the image, depending on which protocol\n you want to use for your BYOL Workspace image, either PCoIP or WorkSpaces Streaming\n Protocol (WSP). To use WSP, specify a value that ends in <code>_WSP</code>. To use PCoIP,\n specify a value that does not end in <code>_WSP</code>. </p>\n <p>For non-GPU-enabled bundles (bundles other than Graphics or GraphicsPro), specify\n <code>BYOL_REGULAR</code> or <code>BYOL_REGULAR_WSP</code>, depending on the\n protocol.</p>",
"smithy.api#required": {}
}
},
Expand All @@ -3324,7 +3327,7 @@
"Applications": {
"target": "com.amazonaws.workspaces#ApplicationList",
"traits": {
"smithy.api#documentation": "<p>If specified, the version of Microsoft Office to subscribe to. Valid only for Windows 10\n BYOL images. For more information about subscribing to Office for BYOL images, see <a href=\"https://docs.aws.amazon.com/workspaces/latest/adminguide/byol-windows-images.html\"> Bring\n Your Own Windows Desktop Licenses</a>.</p>\n <note>\n <ul>\n <li>\n <p>Although this parameter is an array, only one item is allowed at this time</p>\n </li>\n <li>\n <p>Microsoft Office 2016 application subscription through AWS is currently not supported \n for Graphics.g4dn Bring Your Own License (BYOL) images</p>\n </li>\n </ul>\n </note>"
"smithy.api#documentation": "<p>If specified, the version of Microsoft Office to subscribe to. Valid only for Windows 10\n BYOL images. For more information about subscribing to Office for BYOL images, see <a href=\"https://docs.aws.amazon.com/workspaces/latest/adminguide/byol-windows-images.html\"> Bring\n Your Own Windows Desktop Licenses</a>.</p>\n <note>\n <p>Although this parameter is an array, only one item is allowed at this time.</p>\n </note>"
}
}
}
Expand Down Expand Up @@ -3391,19 +3394,19 @@
"LogoUrl": {
"target": "com.amazonaws.workspaces#ClientUrl",
"traits": {
"smithy.api#documentation": "<p>The logo. This is the link where users can download the logo image. This is the\n standard-resolution display that has a 1:1 pixel density (or @1x), where one pixel is equal\n to one point.</p>"
"smithy.api#documentation": "<p>The logo. This is the\n standard-resolution display that has a 1:1 pixel density (or @1x), where one pixel is equal\n to one point. The only image format accepted is a binary data object that is converted from \n a <code>.png</code> file.</p>"
}
},
"Logo2xUrl": {
"target": "com.amazonaws.workspaces#ClientUrl",
"traits": {
"smithy.api#documentation": "<p>The @2x version of the logo. This is the higher resolution display that offers a scale\n factor of 2.0 (or @2x).</p>\n <note>\n <p> For more information about iOS image size and resolution, see <a href=\"https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/image-size-and-resolution/\">Image Size and Resolution </a> in the <i>Apple Human Interface\n Guidelines</i>.</p>\n </note>"
"smithy.api#documentation": "<p>The @2x version of the logo. This is the higher resolution display that offers a scale\n factor of 2.0 (or @2x). The only image format accepted is a binary data object that is \n converted from a <code>.png</code> file.</p>\n <note>\n <p> For more information about iOS image size and resolution, see <a href=\"https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/image-size-and-resolution/\">Image Size and Resolution </a> in the <i>Apple Human Interface\n Guidelines</i>.</p>\n </note>"
}
},
"Logo3xUrl": {
"target": "com.amazonaws.workspaces#ClientUrl",
"traits": {
"smithy.api#documentation": "<p>The @3x version of the logo. This is the higher resolution display that offers a scale\n factor of 3.0 (or @3x).</p>\n <note>\n <p> For more information about iOS image size and resolution, see <a href=\"https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/image-size-and-resolution/\">Image Size and Resolution </a> in the <i>Apple Human Interface\n Guidelines</i>.</p>\n </note>"
"smithy.api#documentation": "<p>The @3x version of the logo. This is the higher resolution display that offers a scale\n factor of 3.0 (or @3x).The only image format accepted is a binary data object that is \n converted from a <code>.png</code> file.</p>\n <note>\n <p> For more information about iOS image size and resolution, see <a href=\"https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/image-size-and-resolution/\">Image Size and Resolution </a> in the <i>Apple Human Interface\n Guidelines</i>.</p>\n </note>"
}
},
"SupportEmail": {
Expand Down Expand Up @@ -3441,19 +3444,19 @@
"Logo": {
"target": "com.amazonaws.workspaces#IosLogo",
"traits": {
"smithy.api#documentation": "<p>The logo. This is the link where users can download the logo image. This is the\n standard-resolution display that has a 1:1 pixel density (or @1x), where one pixel is equal\n to one point.</p>"
"smithy.api#documentation": "<p>The logo. This is the\n standard-resolution display that has a 1:1 pixel density (or @1x), where one pixel is equal\n to one point. The only image format accepted is a binary data object that is converted \n from a <code>.png</code> file.</p>"
}
},
"Logo2x": {
"target": "com.amazonaws.workspaces#Ios2XLogo",
"traits": {
"smithy.api#documentation": "<p>The @2x version of the logo. This is the higher resolution display that offers a scale\n factor of 2.0 (or @2x).</p>\n <note>\n <p> For more information about iOS image size and resolution, see <a href=\"https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/image-size-and-resolution/\">Image Size and Resolution </a> in the <i>Apple Human Interface\n Guidelines</i>.</p>\n </note>"
"smithy.api#documentation": "<p>The @2x version of the logo. This is the higher resolution display that offers a scale\n factor of 2.0 (or @2x). The only image format accepted is a binary data object that is \n converted from a <code>.png</code> file.</p>\n <note>\n <p> For more information about iOS image size and resolution, see <a href=\"https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/image-size-and-resolution/\">Image Size and Resolution </a> in the <i>Apple Human Interface\n Guidelines</i>.</p>\n </note>"
}
},
"Logo3x": {
"target": "com.amazonaws.workspaces#Ios3XLogo",
"traits": {
"smithy.api#documentation": "<p>The @3x version of the logo. This is the higher resolution display that offers a scale\n factor of 3.0 (or @3x).</p>\n <note>\n <p> For more information about iOS image size and resolution, see <a href=\"https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/image-size-and-resolution/\">Image Size and Resolution </a> in the <i>Apple Human Interface\n Guidelines</i>.</p>\n </note>"
"smithy.api#documentation": "<p>The @3x version of the logo. This is the higher resolution display that offers a scale\n factor of 3.0 (or @3x). The only image format accepted is a binary data object that is \n converted from a <code>.png</code> file.</p>\n <note>\n <p> For more information about iOS image size and resolution, see <a href=\"https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/image-size-and-resolution/\">Image Size and Resolution </a> in the <i>Apple Human Interface\n Guidelines</i>.</p>\n </note>"
}
},
"SupportEmail": {
Expand Down Expand Up @@ -4168,7 +4171,16 @@
"type": "structure",
"members": {
"message": {
"target": "com.amazonaws.workspaces#ExceptionMessage"
"target": "com.amazonaws.workspaces#ExceptionMessage",
"traits": {
"smithy.api#documentation": "<p>The exception error message.</p>"
}
},
"reason": {
"target": "com.amazonaws.workspaces#ExceptionErrorCode",
"traits": {
"smithy.api#documentation": "<p>The exception error reason.</p>"
}
}
},
"traits": {
Expand Down

0 comments on commit 3fb0a96

Please sign in to comment.