Back to index
Summary
Creates a new credential for a project.projectNameStringrequiredThe name for the project that must be unique among all projects. credentialNameStringrequiredThe name of the credential. credentialProviderNameStringoptionalName of the credential provider where the credential secret is stored. credentialProviderProjectNameStringoptionalName of the credential provider project, if different from the credential project. credentialTypeStringoptionalCredential type. Default is LOCAL. Possible values: "EXTERNAL" , "LOCAL" descriptionStringoptionalComment text describing this object that is not interpreted at all by CloudBees CD/RO. passwordStringoptionalThe password for the credential. Can also be a certificate or any other chunk of data. passwordRecoveryAllowedBooleanoptionalIf true, recovering the password by invoking getFullCredential from a job step is allowed. secretPathStringoptionalName of the folder where the password is stored. testBooleanoptionalApplicable if credentialProviderName is specified. Whether to test that the credential exists in the secret management system prior to saving. Defaults to true. userNameStringoptionalThe user name for the credential. virtualUserNameStringoptionalApplicable for cyberark ccp provider type. This property identifies two identically provisioned accounts in a dual accounts pair under one virtual username. |
Usage
Groovy
import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.createCredential( projectName: "test-projectName", credentialName: "test-credentialName" /* optional arguments */ )