updateAppBlockBuilder method
Updates an app block builder.
If the app block builder is in the STARTING or
STOPPING state, you can't update it. If the app block builder
is in the RUNNING state, you can only update the DisplayName
and Description. If the app block builder is in the STOPPED
state, you can update any attribute except the Name.
May throw ConcurrentModificationException.
May throw InvalidAccountStatusException.
May throw InvalidParameterCombinationException.
May throw InvalidRoleException.
May throw LimitExceededException.
May throw OperationNotPermittedException.
May throw RequestLimitExceededException.
May throw ResourceInUseException.
May throw ResourceNotAvailableException.
May throw ResourceNotFoundException.
Parameter name :
The unique name for the app block builder.
Parameter accessEndpoints :
The list of interface VPC endpoint (interface endpoint) objects.
Administrators can connect to the app block builder only through the
specified endpoints.
Parameter attributesToDelete :
The attributes to delete from the app block builder.
Parameter description :
The description of the app block builder.
Parameter disableIMDSV1 :
Set to true to disable Instance Metadata Service Version 1 (IMDSv1) and
enforce IMDSv2. Set to false to enable both IMDSv1 and IMDSv2.
Parameter displayName :
The display name of the app block builder.
Parameter enableDefaultInternetAccess :
Enables or disables default internet access for the app block builder.
Parameter iamRoleArn :
The Amazon Resource Name (ARN) of the IAM role to apply to the app block
builder. To assume a role, the app block builder calls the AWS Security
Token Service (STS) AssumeRole API operation and passes the
ARN of the role to use. The operation creates a new session with temporary
credentials. WorkSpaces Applications retrieves the temporary credentials
and creates the appstream_machine_role credential profile on the
instance.
For more information, see Using an IAM Role to Grant Permissions to Applications and Scripts Running on WorkSpaces Applications Streaming Instances in the Amazon WorkSpaces Applications Administration Guide.
Parameter instanceType :
The instance type to use when launching the app block builder. The
following instance types are available:
- stream.standard.small
- stream.standard.medium
- stream.standard.large
- stream.standard.xlarge
- stream.standard.2xlarge
Parameter platform :
The platform of the app block builder.
WINDOWS_SERVER_2019 is the only valid value.
Parameter vpcConfig :
The VPC configuration for the app block builder.
App block builders require that you specify at least two subnets in different availability zones.
Implementation
Future<UpdateAppBlockBuilderResult> updateAppBlockBuilder({
required String name,
List<AccessEndpoint>? accessEndpoints,
List<AppBlockBuilderAttribute>? attributesToDelete,
String? description,
bool? disableIMDSV1,
String? displayName,
bool? enableDefaultInternetAccess,
String? iamRoleArn,
String? instanceType,
PlatformType? platform,
VpcConfig? vpcConfig,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'PhotonAdminProxyService.UpdateAppBlockBuilder'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Name': name,
if (accessEndpoints != null) 'AccessEndpoints': accessEndpoints,
if (attributesToDelete != null)
'AttributesToDelete': attributesToDelete.map((e) => e.value).toList(),
if (description != null) 'Description': description,
if (disableIMDSV1 != null) 'DisableIMDSV1': disableIMDSV1,
if (displayName != null) 'DisplayName': displayName,
if (enableDefaultInternetAccess != null)
'EnableDefaultInternetAccess': enableDefaultInternetAccess,
if (iamRoleArn != null) 'IamRoleArn': iamRoleArn,
if (instanceType != null) 'InstanceType': instanceType,
if (platform != null) 'Platform': platform.value,
if (vpcConfig != null) 'VpcConfig': vpcConfig,
},
);
return UpdateAppBlockBuilderResult.fromJson(jsonResponse.body);
}