createPartnerApp method
- required PartnerAppAuthType authType,
- required String executionRoleArn,
- required String name,
- required String tier,
- required PartnerAppType type,
- PartnerAppConfig? applicationConfig,
- String? clientToken,
- bool? enableAutoMinorVersionUpgrade,
- bool? enableIamSessionBasedIdentity,
- String? kmsKeyId,
- PartnerAppMaintenanceConfig? maintenanceConfig,
- List<
Tag> ? tags,
Creates an Amazon SageMaker Partner AI App.
May throw ConflictException.
May throw ResourceLimitExceeded.
Parameter authType :
The authorization type that users use to access the SageMaker Partner AI
App.
Parameter executionRoleArn :
The ARN of the IAM role that the partner application uses.
Parameter name :
The name to give the SageMaker Partner AI App.
Parameter tier :
Indicates the instance type and size of the cluster attached to the
SageMaker Partner AI App.
Parameter type :
The type of SageMaker Partner AI App to create. Must be one of the
following: lakera-guard, comet,
deepchecks-llm-evaluation, or fiddler.
Parameter applicationConfig :
Configuration settings for the SageMaker Partner AI App.
Parameter clientToken :
A unique token that guarantees that the call to this API is idempotent.
Parameter enableAutoMinorVersionUpgrade :
When set to TRUE, the SageMaker Partner AI App is
automatically upgraded to the latest minor version during the next
scheduled maintenance window, if one is available. Default is
FALSE.
Parameter enableIamSessionBasedIdentity :
When set to TRUE, the SageMaker Partner AI App sets the
Amazon Web Services IAM session name or the authenticated IAM user as the
identity of the SageMaker Partner AI App user.
Parameter kmsKeyId :
SageMaker Partner AI Apps uses Amazon Web Services KMS to encrypt data at
rest using an Amazon Web Services managed key by default. For more
control, specify a customer managed key.
Parameter maintenanceConfig :
Maintenance configuration settings for the SageMaker Partner AI App.
Parameter tags :
Each tag consists of a key and an optional value. Tag keys must be unique
per resource.
Implementation
Future<CreatePartnerAppResponse> createPartnerApp({
required PartnerAppAuthType authType,
required String executionRoleArn,
required String name,
required String tier,
required PartnerAppType type,
PartnerAppConfig? applicationConfig,
String? clientToken,
bool? enableAutoMinorVersionUpgrade,
bool? enableIamSessionBasedIdentity,
String? kmsKeyId,
PartnerAppMaintenanceConfig? maintenanceConfig,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.CreatePartnerApp'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AuthType': authType.value,
'ExecutionRoleArn': executionRoleArn,
'Name': name,
'Tier': tier,
'Type': type.value,
if (applicationConfig != null) 'ApplicationConfig': applicationConfig,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
if (enableAutoMinorVersionUpgrade != null)
'EnableAutoMinorVersionUpgrade': enableAutoMinorVersionUpgrade,
if (enableIamSessionBasedIdentity != null)
'EnableIamSessionBasedIdentity': enableIamSessionBasedIdentity,
if (kmsKeyId != null) 'KmsKeyId': kmsKeyId,
if (maintenanceConfig != null) 'MaintenanceConfig': maintenanceConfig,
if (tags != null) 'Tags': tags,
},
);
return CreatePartnerAppResponse.fromJson(jsonResponse.body);
}