Skip to content

Commit

Permalink
This release adds protocols attribute to workspaces properties data t…
Browse files Browse the repository at this point in the history
…ype. This enables customers to migrate workspaces from PC over IP (PCoIP) to WorkSpaces Streaming Protocol (WSP) using create and modify workspaces public APIs.
  • Loading branch information
aws-sdk-dotnet-automation committed Nov 7, 2022
1 parent 91754b2 commit d8639f7
Show file tree
Hide file tree
Showing 7 changed files with 142 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2330,6 +2330,17 @@
"max":2048,
"min":1
},
"Protocol":{
"type":"string",
"enum":[
"PCOIP",
"WSP"
]
},
"ProtocolList":{
"type":"list",
"member":{"shape":"Protocol"}
},
"RebootRequest":{
"type":"structure",
"required":["WorkspaceId"],
Expand Down Expand Up @@ -3024,7 +3035,8 @@
"RunningModeAutoStopTimeoutInMinutes":{"shape":"RunningModeAutoStopTimeoutInMinutes"},
"RootVolumeSizeGib":{"shape":"RootVolumeSizeGib"},
"UserVolumeSizeGib":{"shape":"UserVolumeSizeGib"},
"ComputeTypeName":{"shape":"Compute"}
"ComputeTypeName":{"shape":"Compute"},
"Protocols":{"shape":"ProtocolList"}
}
},
"WorkspaceRequest":{
Expand Down
12 changes: 12 additions & 0 deletions generator/ServiceModels/workspaces/workspaces-2015-04-08.docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1415,6 +1415,18 @@
"ListAvailableManagementCidrRangesResult$NextToken": "<p>The token to use to retrieve the next page of results. This value is null when there are no more results to return. </p>"
}
},
"Protocol": {
"base": null,
"refs": {
"ProtocolList$member": null
}
},
"ProtocolList": {
"base": null,
"refs": {
"WorkspaceProperties$Protocols": "<p>The protocol. For more information, see <a href=\"https://docs.aws.amazon.com/workspaces/latest/adminguide/amazon-workspaces-protocols.html\"> Protocols for Amazon WorkSpaces</a>.</p> <note> <ul> <li> <p>Only available for WorkSpaces created with PCoIP bundles.</p> </li> <li> <p>The <code>Protocols</code> property is case sensitive. Ensure you use <code>PCOIP</code> or <code>WSP</code>.</p> </li> <li> <p>Unavailable for Windows 7 WorkSpaces and WorkSpaces using GPU-based bundles (Graphics, GraphicsPro, Graphics.g4dn, and GraphicsPro.g4dn).</p> </li> </ul> </note>"
}
},
"RebootRequest": {
"base": "<p>Describes the information used to reboot a WorkSpace.</p>",
"refs": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3188,6 +3188,17 @@
"max":2048,
"min":1
},
"Protocol":{
"type":"string",
"enum":[
"PCOIP",
"WSP"
]
},
"ProtocolList":{
"type":"list",
"member":{"shape":"Protocol"}
},
"RebootRequest":{
"type":"structure",
"required":["WorkspaceId"],
Expand Down Expand Up @@ -4308,6 +4319,10 @@
"ComputeTypeName":{
"shape":"Compute",
"documentation":"<p>The compute type. For more information, see <a href=\"http://aws.amazon.com/workspaces/details/#Amazon_WorkSpaces_Bundles\">Amazon WorkSpaces Bundles</a>.</p>"
},
"Protocols":{
"shape":"ProtocolList",
"documentation":"<p>The protocol. For more information, see <a href=\"https://docs.aws.amazon.com/workspaces/latest/adminguide/amazon-workspaces-protocols.html\"> Protocols for Amazon WorkSpaces</a>.</p> <note> <ul> <li> <p>Only available for WorkSpaces created with PCoIP bundles.</p> </li> <li> <p>The <code>Protocols</code> property is case sensitive. Ensure you use <code>PCOIP</code> or <code>WSP</code>.</p> </li> <li> <p>Unavailable for Windows 7 WorkSpaces and WorkSpaces using GPU-based bundles (Graphics, GraphicsPro, Graphics.g4dn, and GraphicsPro.g4dn).</p> </li> </ul> </note>"
}
},
"documentation":"<p>Describes a WorkSpace.</p>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ public void Marshall(WorkspaceProperties requestObject, JsonMarshallerContext co
context.Writer.Write(requestObject.ComputeTypeName);
}

if(requestObject.IsSetProtocols())
{
context.Writer.WritePropertyName("Protocols");
context.Writer.WriteArrayStart();
foreach(var requestObjectProtocolsListValue in requestObject.Protocols)
{
context.Writer.Write(requestObjectProtocolsListValue);
}
context.Writer.WriteArrayEnd();
}

if(requestObject.IsSetRootVolumeSizeGib())
{
context.Writer.WritePropertyName("RootVolumeSizeGib");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ public WorkspaceProperties Unmarshall(JsonUnmarshallerContext context)
unmarshalledObject.ComputeTypeName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Protocols", targetDepth))
{
var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
unmarshalledObject.Protocols = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("RootVolumeSizeGib", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
Expand Down
35 changes: 35 additions & 0 deletions sdk/src/Services/WorkSpaces/Generated/Model/WorkspaceProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ namespace Amazon.WorkSpaces.Model
public partial class WorkspaceProperties
{
private Compute _computeTypeName;
private List<string> _protocols = new List<string>();
private int? _rootVolumeSizeGib;
private RunningMode _runningMode;
private int? _runningModeAutoStopTimeoutInMinutes;
Expand All @@ -58,6 +59,40 @@ internal bool IsSetComputeTypeName()
return this._computeTypeName != null;
}

/// <summary>
/// Gets and sets the property Protocols.
/// <para>
/// The protocol. For more information, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/amazon-workspaces-protocols.html">
/// Protocols for Amazon WorkSpaces</a>.
/// </para>
/// <note> <ul> <li>
/// <para>
/// Only available for WorkSpaces created with PCoIP bundles.
/// </para>
/// </li> <li>
/// <para>
/// The <code>Protocols</code> property is case sensitive. Ensure you use <code>PCOIP</code>
/// or <code>WSP</code>.
/// </para>
/// </li> <li>
/// <para>
/// Unavailable for Windows 7 WorkSpaces and WorkSpaces using GPU-based bundles (Graphics,
/// GraphicsPro, Graphics.g4dn, and GraphicsPro.g4dn).
/// </para>
/// </li> </ul> </note>
/// </summary>
public List<string> Protocols
{
get { return this._protocols; }
set { this._protocols = value; }
}

// Check to see if Protocols property is set
internal bool IsSetProtocols()
{
return this._protocols != null && this._protocols.Count > 0;
}

/// <summary>
/// Gets and sets the property RootVolumeSizeGib.
/// <para>
Expand Down
50 changes: 50 additions & 0 deletions sdk/src/Services/WorkSpaces/Generated/ServiceEnumerations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,56 @@ public static implicit operator OperatingSystemType(string value)
}


/// <summary>
/// Constants used for properties of type Protocol.
/// </summary>
public class Protocol : ConstantClass
{

/// <summary>
/// Constant PCOIP for Protocol
/// </summary>
public static readonly Protocol PCOIP = new Protocol("PCOIP");
/// <summary>
/// Constant WSP for Protocol
/// </summary>
public static readonly Protocol WSP = new Protocol("WSP");

/// <summary>
/// This constant constructor does not need to be called if the constant
/// you are attempting to use is already defined as a static instance of
/// this class.
/// This constructor should be used to construct constants that are not
/// defined as statics, for instance if attempting to use a feature that is
/// newer than the current version of the SDK.
/// </summary>
public Protocol(string value)
: base(value)
{
}

/// <summary>
/// Finds the constant for the unique value.
/// </summary>
/// <param name="value">The unique value for the constant</param>
/// <returns>The constant for the unique value</returns>
public static Protocol FindValue(string value)
{
return FindValue<Protocol>(value);
}

/// <summary>
/// Utility method to convert strings to the constant class.
/// </summary>
/// <param name="value">The string value to convert to the constant class.</param>
/// <returns></returns>
public static implicit operator Protocol(string value)
{
return FindValue(value);
}
}


/// <summary>
/// Constants used for properties of type ReconnectEnum.
/// </summary>
Expand Down

0 comments on commit d8639f7

Please sign in to comment.