updateAccountSettings method

Future<UpdateAccountSettingsOutput> updateAccountSettings({
  1. bool? deletePipelineProvisioningRepository,
  2. String? pipelineCodebuildRoleArn,
  3. RepositoryBranchInput? pipelineProvisioningRepository,
  4. String? pipelineServiceRoleArn,
})

Update Proton settings that are used for multiple services in the Amazon Web Services account.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter deletePipelineProvisioningRepository : Set to true to remove a configured pipeline repository from the account settings. Don't set this field if you are updating the configured pipeline repository.

Parameter pipelineCodebuildRoleArn : The Amazon Resource Name (ARN) of the service role you want to use for provisioning pipelines. Proton assumes this role for CodeBuild-based provisioning.

Parameter pipelineProvisioningRepository : A linked repository for pipeline provisioning. Specify it if you have environments configured for self-managed provisioning with services that include pipelines. A linked repository is a repository that has been registered with Proton. For more information, see CreateRepository.

To remove a previously configured repository, set deletePipelineProvisioningRepository to true, and don't set pipelineProvisioningRepository.

Parameter pipelineServiceRoleArn : The Amazon Resource Name (ARN) of the service role you want to use for provisioning pipelines. Assumed by Proton for Amazon Web Services-managed provisioning, and by customer-owned automation for self-managed provisioning.

To remove a previously configured ARN, specify an empty string.

Implementation

Future<UpdateAccountSettingsOutput> updateAccountSettings({
  bool? deletePipelineProvisioningRepository,
  String? pipelineCodebuildRoleArn,
  RepositoryBranchInput? pipelineProvisioningRepository,
  String? pipelineServiceRoleArn,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AwsProton20200720.UpdateAccountSettings'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (deletePipelineProvisioningRepository != null)
        'deletePipelineProvisioningRepository':
            deletePipelineProvisioningRepository,
      if (pipelineCodebuildRoleArn != null)
        'pipelineCodebuildRoleArn': pipelineCodebuildRoleArn,
      if (pipelineProvisioningRepository != null)
        'pipelineProvisioningRepository': pipelineProvisioningRepository,
      if (pipelineServiceRoleArn != null)
        'pipelineServiceRoleArn': pipelineServiceRoleArn,
    },
  );

  return UpdateAccountSettingsOutput.fromJson(jsonResponse.body);
}