createPlatformVersion method

Future<CreatePlatformVersionResult> createPlatformVersion(
  1. {required S3Location platformDefinitionBundle,
  2. required String platformName,
  3. required String platformVersion,
  4. String? environmentName,
  5. List<ConfigurationOptionSetting>? optionSettings,
  6. List<Tag>? tags}
)

Create a new version of your custom platform.

May throw InsufficientPrivilegesException. May throw ElasticBeanstalkServiceException. May throw TooManyPlatformsException.

Parameter platformDefinitionBundle : The location of the platform definition archive in Amazon S3.

Parameter platformName : The name of your custom platform.

Parameter platformVersion : The number, such as 1.0.2, for the new platform version.

Parameter environmentName : The name of the builder environment.

Parameter optionSettings : The configuration option settings to apply to the builder environment.

Parameter tags : Specifies the tags applied to the new platform version.

Elastic Beanstalk applies these tags only to the platform version. Environments that you create using the platform version don't inherit the tags.

Implementation

Future<CreatePlatformVersionResult> createPlatformVersion({
  required S3Location platformDefinitionBundle,
  required String platformName,
  required String platformVersion,
  String? environmentName,
  List<ConfigurationOptionSetting>? optionSettings,
  List<Tag>? tags,
}) async {
  ArgumentError.checkNotNull(
      platformDefinitionBundle, 'platformDefinitionBundle');
  ArgumentError.checkNotNull(platformName, 'platformName');
  ArgumentError.checkNotNull(platformVersion, 'platformVersion');
  _s.validateStringLength(
    'environmentName',
    environmentName,
    4,
    40,
  );
  final $request = <String, dynamic>{};
  $request['PlatformDefinitionBundle'] = platformDefinitionBundle;
  $request['PlatformName'] = platformName;
  $request['PlatformVersion'] = platformVersion;
  environmentName?.also((arg) => $request['EnvironmentName'] = arg);
  optionSettings?.also((arg) => $request['OptionSettings'] = arg);
  tags?.also((arg) => $request['Tags'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'CreatePlatformVersion',
    version: '2010-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['CreatePlatformVersionRequest'],
    shapes: shapes,
    resultWrapper: 'CreatePlatformVersionResult',
  );
  return CreatePlatformVersionResult.fromXml($result);
}