/AWS1/IF_DPL=>CREATEDEPLOYMENT()¶
About CreateDeployment¶
Deploys an application revision through the specified deployment group.
Method Signature¶
METHODS /AWS1/IF_DPL~CREATEDEPLOYMENT
IMPORTING
!IV_APPLICATIONNAME TYPE /AWS1/DPLAPPLICATIONNAME OPTIONAL
!IV_DEPLOYMENTGROUPNAME TYPE /AWS1/DPLDEPLOYMENTGROUPNAME OPTIONAL
!IO_REVISION TYPE REF TO /AWS1/CL_DPLREVISIONLOCATION OPTIONAL
!IV_DEPLOYMENTCONFIGNAME TYPE /AWS1/DPLDEPLOYMENTCONFIGNAME OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/DPLDESCRIPTION OPTIONAL
!IV_IGNOREAPPLICATIONSTOPFA00 TYPE /AWS1/DPLBOOLEAN OPTIONAL
!IO_TARGETINSTANCES TYPE REF TO /AWS1/CL_DPLTARGETINSTANCES OPTIONAL
!IO_AUTOROLLBACKCONFIGURATION TYPE REF TO /AWS1/CL_DPLAUTOROLLBACKCONF OPTIONAL
!IV_UPDATEOUTDATEDINSTSONLY TYPE /AWS1/DPLBOOLEAN OPTIONAL
!IV_FILEEXISTSBEHAVIOR TYPE /AWS1/DPLFILEEXISTSBEHAVIOR OPTIONAL
!IO_OVERRIDEALARMCONF TYPE REF TO /AWS1/CL_DPLALARMCONFIGURATION OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_dplcredeploymentout
RAISING
/AWS1/CX_DPLALARMSLIMITEXCDEX
/AWS1/CX_DPLAPPLICATIONDOESN00
/AWS1/CX_DPLAPPLICATIONNAMER00
/AWS1/CX_DPLDEPLOYMENTCFGDOE00
/AWS1/CX_DPLDEPLOYMENTGRDOES00
/AWS1/CX_DPLDEPLOYMENTGRNAME00
/AWS1/CX_DPLDEPLOYMENTLMTEXC00
/AWS1/CX_DPLDESCTOOLONGEX
/AWS1/CX_DPLINVALARMCONFIGEX
/AWS1/CX_DPLINVAPPLICATIONNA00
/AWS1/CX_DPLINVAUTOROLLBACKC00
/AWS1/CX_DPLINVAUTOSCGROUPEX
/AWS1/CX_DPLINVDEPLOYMENTCFG00
/AWS1/CX_DPLINVDEPLOYMENTGRN00
/AWS1/CX_DPLINVFILEEXBEHAVEX
/AWS1/CX_DPLINVGITHUBACCTTOKEX
/AWS1/CX_DPLINVIGNOREAPPLICA00
/AWS1/CX_DPLINVLOADBALANCERI00
/AWS1/CX_DPLINVALIDREVISIONEX
/AWS1/CX_DPLINVALIDROLEEX
/AWS1/CX_DPLINVTARGETINSTSEX
/AWS1/CX_DPLINVTRFROUTINGCON00
/AWS1/CX_DPLINVUPOUTDATEDINS00
/AWS1/CX_DPLREVISIONDOESNOTE00
/AWS1/CX_DPLREVISIONREQUIREDEX
/AWS1/CX_DPLTHROTTLINGEX
/AWS1/CX_DPLCLIENTEXC
/AWS1/CX_DPLSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_applicationname TYPE /AWS1/DPLAPPLICATIONNAME /AWS1/DPLAPPLICATIONNAME¶
The name of an CodeDeploy application associated with the user or Amazon Web Services account.
Optional arguments:¶
iv_deploymentgroupname TYPE /AWS1/DPLDEPLOYMENTGROUPNAME /AWS1/DPLDEPLOYMENTGROUPNAME¶
The name of the deployment group.
io_revision TYPE REF TO /AWS1/CL_DPLREVISIONLOCATION /AWS1/CL_DPLREVISIONLOCATION¶
The type and location of the revision to deploy.
iv_deploymentconfigname TYPE /AWS1/DPLDEPLOYMENTCONFIGNAME /AWS1/DPLDEPLOYMENTCONFIGNAME¶
The name of a deployment configuration associated with the user or Amazon Web Services account.
If not specified, the value configured in the deployment group is used as the default. If the deployment group does not have a deployment configuration associated with it,
CodeDeployDefault.OneAtATimeis used by default.
iv_description TYPE /AWS1/DPLDESCRIPTION /AWS1/DPLDESCRIPTION¶
A comment about the deployment.
iv_ignoreapplicationstopfa00 TYPE /AWS1/DPLBOOLEAN /AWS1/DPLBOOLEAN¶
If true, then if an
ApplicationStop,BeforeBlockTraffic, orAfterBlockTrafficdeployment lifecycle event to an instance fails, then the deployment continues to the next deployment lifecycle event. For example, ifApplicationStopfails, the deployment continues withDownloadBundle. IfBeforeBlockTrafficfails, the deployment continues withBlockTraffic. IfAfterBlockTrafficfails, the deployment continues withApplicationStop.If false or not specified, then if a lifecycle event fails during a deployment to an instance, that deployment fails. If deployment to that instance is part of an overall deployment and the number of healthy hosts is not less than the minimum number of healthy hosts, then a deployment to the next instance is attempted.
During a deployment, the CodeDeploy agent runs the scripts specified for
ApplicationStop,BeforeBlockTraffic, andAfterBlockTrafficin the AppSpec file from the previous successful deployment. (All other scripts are run from the AppSpec file in the current deployment.) If one of these scripts contains an error and does not run successfully, the deployment can fail.If the cause of the failure is a script from the last successful deployment that will never run successfully, create a new deployment and use
ignoreApplicationStopFailuresto specify that theApplicationStop,BeforeBlockTraffic, andAfterBlockTrafficfailures should be ignored.
io_targetinstances TYPE REF TO /AWS1/CL_DPLTARGETINSTANCES /AWS1/CL_DPLTARGETINSTANCES¶
Information about the instances that belong to the replacement environment in a blue/green deployment.
io_autorollbackconfiguration TYPE REF TO /AWS1/CL_DPLAUTOROLLBACKCONF /AWS1/CL_DPLAUTOROLLBACKCONF¶
Configuration information for an automatic rollback that is added when a deployment is created.
iv_updateoutdatedinstsonly TYPE /AWS1/DPLBOOLEAN /AWS1/DPLBOOLEAN¶
Indicates whether to deploy to all instances or only to instances that are not running the latest application revision.
iv_fileexistsbehavior TYPE /AWS1/DPLFILEEXISTSBEHAVIOR /AWS1/DPLFILEEXISTSBEHAVIOR¶
Information about how CodeDeploy handles files that already exist in a deployment target location but weren't part of the previous successful deployment.
The
fileExistsBehaviorparameter takes any of the following values:
DISALLOW: The deployment fails. This is also the default behavior if no option is specified.
OVERWRITE: The version of the file from the application revision currently being deployed replaces the version already on the instance.
RETAIN: The version of the file already on the instance is kept and used as part of the new deployment.
io_overridealarmconf TYPE REF TO /AWS1/CL_DPLALARMCONFIGURATION /AWS1/CL_DPLALARMCONFIGURATION¶
Allows you to specify information about alarms associated with a deployment. The alarm configuration that you specify here will override the alarm configuration at the deployment group level. Consider overriding the alarm configuration if you have set up alarms at the deployment group level that are causing deployment failures. In this case, you would call
CreateDeploymentto create a new deployment that uses a previous application revision that is known to work, and set its alarm configuration to turn off alarm polling. Turning off alarm polling ensures that the new deployment proceeds without being blocked by the alarm that was generated by the previous, failed, deployment.If you specify an
overrideAlarmConfiguration, you need theUpdateDeploymentGroupIAM permission when callingCreateDeployment.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_dplcredeploymentout /AWS1/CL_DPLCREDEPLOYMENTOUT¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->createdeployment(
io_autorollbackconfiguration = new /aws1/cl_dplautorollbackconf(
it_events = VALUE /aws1/cl_dplautorollbackevts00=>tt_autorollbackeventslist(
( new /aws1/cl_dplautorollbackevts00( |string| ) )
)
iv_enabled = ABAP_TRUE
)
io_overridealarmconf = new /aws1/cl_dplalarmconfiguration(
it_alarms = VALUE /aws1/cl_dplalarm=>tt_alarmlist(
( new /aws1/cl_dplalarm( |string| ) )
)
iv_enabled = ABAP_TRUE
iv_ignorepollalarmfailure = ABAP_TRUE
)
io_revision = new /aws1/cl_dplrevisionlocation(
io_appspeccontent = new /aws1/cl_dplappspeccontent(
iv_content = |string|
iv_sha256 = |string|
)
io_githublocation = new /aws1/cl_dplgithublocation(
iv_commitid = |string|
iv_repository = |string|
)
io_s3location = new /aws1/cl_dpls3location(
iv_bucket = |string|
iv_bundletype = |string|
iv_etag = |string|
iv_key = |string|
iv_version = |string|
)
io_string = new /aws1/cl_dplrawstring(
iv_content = |string|
iv_sha256 = |string|
)
iv_revisiontype = |string|
)
io_targetinstances = new /aws1/cl_dpltargetinstances(
io_ec2tagset = new /aws1/cl_dplec2tagset(
it_ec2tagsetlist = VALUE /aws1/cl_dplec2tagfilter=>tt_ec2tagsetlist(
(
VALUE /aws1/cl_dplec2tagfilter=>tt_ec2tagfilterlist(
(
new /aws1/cl_dplec2tagfilter(
iv_key = |string|
iv_type = |string|
iv_value = |string|
)
)
)
)
)
)
it_autoscalinggroups = VALUE /aws1/cl_dplautoscgrpnamelst_w=>tt_autoscalinggroupnamelist(
( new /aws1/cl_dplautoscgrpnamelst_w( |string| ) )
)
it_tagfilters = VALUE /aws1/cl_dplec2tagfilter=>tt_ec2tagfilterlist(
(
new /aws1/cl_dplec2tagfilter(
iv_key = |string|
iv_type = |string|
iv_value = |string|
)
)
)
)
iv_applicationname = |string|
iv_deploymentconfigname = |string|
iv_deploymentgroupname = |string|
iv_description = |string|
iv_fileexistsbehavior = |string|
iv_ignoreapplicationstopfa00 = ABAP_TRUE
iv_updateoutdatedinstsonly = ABAP_TRUE
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_deploymentid = lo_result->get_deploymentid( ).
ENDIF.