createEnvironment
Create a new environment
Format
udclient [global-args...] [global-flags...]
createEnvironment [parameters] [JSON file]
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| application | string | false | Application to add the environment to |
| name | string | false | Name of the new environment |
| description | string | false | Description of the new environment |
| color | string | false | Color of the new environment, in hex format.
|
| requireApprovals | boolean | false | Whether the environment requires approvals |
| noSelfApprovals | boolean | false | Whether the environment allows self approvals |
Note: You can use any of the following available colors:
| Code | Color |
|---|---|
| #D9182D | Crimson |
| #A91024 | Firebrick |
| #DD731C | Cinnamon |
| #B8461B | Rust |
| #EEA10F | Marigold |
| #B68002 | Dark Goldenrod |
| #FFCF01 | Tangerine Yellow |
| #FDB813 | Golden Poppy |
| #17AF4A | Mountain Meadow |
| #008A52 | Sea Green |
| #007670 | Pine Green |
| #006059 | Bottle Green |
| #00B2EF | Bright Cerulean |
| #00648D | Sea Blue |
| #009AD6 | Bondi Blue |
| #003F69 | Prussian Blue |
| #F051A1 | French Rose |
| #C31D9A | Byzantine |
| #F389AF | Mauvelous |
| #AB1A86 | Red Violet |
| #D86FAC | Mulberry |
| #7F1C7D | Mardi Gras |
| #91922F | Olive |
| #594F13 | Antique Bronze |
| #ACAC78 | Misty Moss |
| #706B4A | Gold Fusion |
| #C7C6C0 | Silver |
| #605F5C | Sonic Silver |
| #8F8D8A | Battleship Grey |
| #404041 | Jet |
| #6D6E70 | Dim Gray |
| #353839 | Onyx |
Template
This command takes a JSON request string or file. Use the following template for the request:
{
"applicationId": "Application ID associated with the
Environment template.",
"cleanupCountToKeep": "Number of most recently deployed
versions to keep (optional)",
"cleanupDaysToKeep": "Number of days to keep versions
deployed to this environment (optional)",
"color": "HTML color code for the environment (optional)",
"description": "Description (optional)",
"exemptProcessesArray": "An array of process Ids. These
processes will be exempt from approvals for this
environment (optional).",
"externalApprovalAgent": "Name or id of agent to run
external approval processes on (optional).",
"externalApprovalAgentPool": "Name or id of agent pool
to run external approval processes on (optional).",
"externalApprovalProcess": "Name or id of external
approval process(optional).",
"historyCleanupDaysToKeep": "Number of days to keep
application process history for this environment
(optional)",
"inheritSystemCleanup": "Inherit the system cleanup
settings. If set to true, this overrides the other cleanup
attributes. (optional, boolean)",
"lockSnapshots": "Whether snapshots will be locked when
deployed to this environment (optional)",
"name": "Environment name",
"noSelfApprovals": "When this option is selected, users
that submit deployment requests cannot approve their own
requests (optional)",
"requireApprovals": "Whether approvals will be required
(optional)",
"requireSnapshot": "If enabled, all deployments must use
a snapshot instead of loose versions (optional)",
"snapshotDaysToKeep": "Number of days to keep snapshots
deployed to this environment (optional)",
"teamMappings": [{
"resourceRoleId": "Id of Resource Type to apply to
this team mapping (optional, can specify either this or
resourceRoleLabel",
"resourceRoleLabel": "Name of Resource Type to apply
to this team mapping (optional, can specify either this or
resourceRoleId",
"teamId": "ID of a team, either this field or
teamLabel are needed to specify a team",
"teamLabel": "Name of the team to map the environment
to, either this field or teamId are needed to specify a
team"
}],
"useSystemDefaultDays": "Whether or not to use the
system default number of days to keep application process
history for this environment (optional)"
}
Example
udclient -username jsmith -password passwd
-weburl https://deployserver.example.com:8443
createEnvironment
-application JPetStore
-name NewEnvironment
-color '#ff0000'Related REST command: Create a new environment.