createCredential

Back to index

Summary

Creates a new credential for a project.
projectName
Stringrequired
The name for the project that must be unique among all projects.
credentialName
Stringrequired
The name of the credential.
userName
Stringrequired
The user name for the credential.
password
Stringrequired
The password for the credential. Can also be a certificate or any other chunk of data.
credentialProviderName
Stringoptional
Name of the credential provider where the credential secret is stored.
credentialProviderProjectName
Stringoptional
Name of the credential provider project, if different from the credential project.
credentialType
Stringoptional
Credential type. Default is LOCAL.
Possible values: "EXTERNAL", "LOCAL"
description
Stringoptional
Comment text describing this object that is not interpreted at all by CloudBees CD/RO.
passwordRecoveryAllowed
Booleanoptional
If true, recovering the password by invoking getFullCredential from a job step is allowed.
secretPath
Stringoptional
Name of the folder where the password is stored.
test
Booleanoptional
Applicable if credentialProviderName is specified. Whether to test that the credential exists in the secret management system prior to saving. Defaults to true.
virtualUserName
Stringoptional
Applicable for cyberark ccp provider type. This property identifies two identically provisioned accounts in a dual accounts pair under one virtual username.

Usage

Perl

$cmdr->createCredential( "test-projectName", # projectName "test-credentialName", # credentialName "test-userName", # userName "test-password" # password # optionals );

ectool

ectool createCredential \ "test-projectName" `# projectName` \ "test-credentialName" `# credentialName` \ "test-userName" `# userName` \ "test-password" `# password` \ # optionals

Examples

Perl

$cmdr->createCredential("Default", "QA Deploy", "QA", "abc123", {description => "Use during preproduction"});

ectool

ectool createCredential <projectName> <credentialName> <userName> <password> [optionals]