startDeployment method

Future<Deployment> startDeployment({
  1. required String applicationId,
  2. required String configurationProfileId,
  3. required String configurationVersion,
  4. required String deploymentStrategyId,
  5. required String environmentId,
  6. String? description,
  7. Map<String, String>? dynamicExtensionParameters,
  8. String? kmsKeyIdentifier,
  9. Map<String, String>? tags,
})

Starts a deployment.

May throw BadRequestException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException.

Parameter applicationId : The application ID.

Parameter configurationProfileId : The configuration profile ID.

Parameter configurationVersion : The configuration version to deploy. If deploying an AppConfig hosted configuration version, you can specify either the version number or version label. For all other configurations, you must specify the version number.

Parameter deploymentStrategyId : The deployment strategy ID.

Parameter environmentId : The environment ID.

Parameter description : A description of the deployment.

Parameter dynamicExtensionParameters : A map of dynamic extension parameter names to values to pass to associated extensions with PRE_START_DEPLOYMENT actions.

Parameter kmsKeyIdentifier : The KMS key identifier (key ID, key alias, or key ARN). AppConfig uses this ID to encrypt the configuration data using a customer managed key.

Parameter tags : Metadata to assign to the deployment. Tags help organize and categorize your AppConfig resources. Each tag consists of a key and an optional value, both of which you define.

Implementation

Future<Deployment> startDeployment({
  required String applicationId,
  required String configurationProfileId,
  required String configurationVersion,
  required String deploymentStrategyId,
  required String environmentId,
  String? description,
  Map<String, String>? dynamicExtensionParameters,
  String? kmsKeyIdentifier,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'ConfigurationProfileId': configurationProfileId,
    'ConfigurationVersion': configurationVersion,
    'DeploymentStrategyId': deploymentStrategyId,
    if (description != null) 'Description': description,
    if (dynamicExtensionParameters != null)
      'DynamicExtensionParameters': dynamicExtensionParameters,
    if (kmsKeyIdentifier != null) 'KmsKeyIdentifier': kmsKeyIdentifier,
    if (tags != null) 'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/applications/${Uri.encodeComponent(applicationId)}/environments/${Uri.encodeComponent(environmentId)}/deployments',
    exceptionFnMap: _exceptionFns,
  );
  return Deployment.fromJson(response);
}