createSchema method
Creates a new schema in a development state. A schema can exist in three phases:
- Development: This is a mutable phase of the schema. All new schemas are in the development phase. Once the schema is finalized, it can be published.
- Published: Published schemas are immutable and have a version associated with them.
- Applied: Applied schemas are mutable in a way that allows you to add new schema facets. You can also add new, nonrequired attributes to existing schema facets. You can apply only published schemas to directories.
May throw InternalServiceException. May throw InvalidArnException. May throw RetryableConflictException. May throw ValidationException. May throw LimitExceededException. May throw AccessDeniedException. May throw SchemaAlreadyExistsException. May throw AccessDeniedException.
Parameter name
:
The name that is associated with the schema. This is unique to each
account and in each region.
Implementation
Future<CreateSchemaResponse> createSchema({
required String name,
}) async {
ArgumentError.checkNotNull(name, 'name');
_s.validateStringLength(
'name',
name,
1,
32,
isRequired: true,
);
final $payload = <String, dynamic>{
'Name': name,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/amazonclouddirectory/2017-01-11/schema/create',
exceptionFnMap: _exceptionFns,
);
return CreateSchemaResponse.fromJson(response);
}