updateServicePipeline method
Update the service pipeline.
There are four modes for updating a service pipeline. The
deploymentType field defines the mode.
-
NONEIn this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
-
CURRENT_VERSIONIn this mode, the service pipeline is deployed and updated with the new spec that you provide. Only requested parameters are updated. Don’t include major or minor version parameters when you use this
deployment-type. -
MINOR_VERSIONIn this mode, the service pipeline is deployed and updated with the published, recommended (latest) minor version of the current major version in use, by default. You can specify a different minor version of the current major version in use.
-
MAJOR_VERSIONIn this mode, the service pipeline is deployed and updated with the published, recommended (latest) major and minor version of the current template by default. You can specify a different major version that's higher than the major version in use and a minor version.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter deploymentType :
The deployment type.
There are four modes for updating a service pipeline. The
deploymentType field defines the mode.
-
NONEIn this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
-
CURRENT_VERSIONIn this mode, the service pipeline is deployed and updated with the new spec that you provide. Only requested parameters are updated. Don’t include major or minor version parameters when you use this
deployment-type. -
MINOR_VERSIONIn this mode, the service pipeline is deployed and updated with the published, recommended (latest) minor version of the current major version in use, by default. You can specify a different minor version of the current major version in use.
-
MAJOR_VERSIONIn this mode, the service pipeline is deployed and updated with the published, recommended (latest) major and minor version of the current template, by default. You can specify a different major version that's higher than the major version in use and a minor version.
Parameter serviceName :
The name of the service to that the pipeline is associated with.
Parameter spec :
The spec for the service pipeline to update.
Parameter templateMajorVersion :
The major version of the service template that was used to create the
service that the pipeline is associated with.
Parameter templateMinorVersion :
The minor version of the service template that was used to create the
service that the pipeline is associated with.
Implementation
Future<UpdateServicePipelineOutput> updateServicePipeline({
required DeploymentUpdateType deploymentType,
required String serviceName,
required String spec,
String? templateMajorVersion,
String? templateMinorVersion,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AwsProton20200720.UpdateServicePipeline'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'deploymentType': deploymentType.value,
'serviceName': serviceName,
'spec': spec,
if (templateMajorVersion != null)
'templateMajorVersion': templateMajorVersion,
if (templateMinorVersion != null)
'templateMinorVersion': templateMinorVersion,
},
);
return UpdateServicePipelineOutput.fromJson(jsonResponse.body);
}