2019-12-02 14:02:51 +01:00
# ${docGenStepName}
## ${docGenDescription}
## Prerequisites
2020-04-01 11:45:31 +02:00
* This step is for creating a Service Key for an existing Service in Cloud Foundry.
2019-12-16 21:44:15 +01:00
* Cloud Foundry API endpoint, organization, space, user and service instance are available
* Credentials have been configured in Jenkins with a dedicated Id
2020-04-01 11:45:31 +02:00
* Additionally you can set the optional serviceKeyConfig flag to configure the Service Key creation with your respective JSON configuration.
2019-12-02 14:02:51 +01:00
## ${docGenParameters}
## ${docGenConfiguration}
## ${docJenkinsPluginDependencies}
## Example
The following example creates a service key named "myServiceKey" for the service instance "myServiceInstance" in the provided cloud foundry organization and space. For the service key creation, the serviceKeyConfig is used.
```groovy
cloudFoundryCreateServiceKey(
2019-12-16 21:44:15 +01:00
script: this,
cloudFoundry: [
apiEndpoint: 'https://test.server.com',
credentialsId: 'cfCredentialsId',
org: 'cfOrg',
space: 'cfSpace',
serviceInstance: 'myServiceInstance',
2020-04-01 11:45:31 +02:00
serviceKeyName: 'myServiceKey',
2019-12-16 21:44:15 +01:00
serviceKeyConfig: '{ \"key\" : \"value\" }'
])
2019-12-02 14:02:51 +01:00
```