createAppImageConfig method
Future<CreateAppImageConfigResponse>
createAppImageConfig({
- required String appImageConfigName,
- KernelGatewayImageConfig? kernelGatewayImageConfig,
- List<
Tag> ? tags,
Creates a configuration for running a SageMaker image as a KernelGateway app. The configuration specifies the Amazon Elastic File System (EFS) storage volume on the image, and a list of the kernels in the image.
May throw ResourceInUse.
Parameter appImageConfigName
:
The name of the AppImageConfig. Must be unique to your account.
Parameter kernelGatewayImageConfig
:
The KernelGatewayImageConfig.
Parameter tags
:
A list of tags to apply to the AppImageConfig.
Implementation
Future<CreateAppImageConfigResponse> createAppImageConfig({
required String appImageConfigName,
KernelGatewayImageConfig? kernelGatewayImageConfig,
List<Tag>? tags,
}) async {
ArgumentError.checkNotNull(appImageConfigName, 'appImageConfigName');
_s.validateStringLength(
'appImageConfigName',
appImageConfigName,
0,
63,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.CreateAppImageConfig'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AppImageConfigName': appImageConfigName,
if (kernelGatewayImageConfig != null)
'KernelGatewayImageConfig': kernelGatewayImageConfig,
if (tags != null) 'Tags': tags,
},
);
return CreateAppImageConfigResponse.fromJson(jsonResponse.body);
}