/AWS1/IF_BLD=>IMPORTSOURCECREDENTIALS()¶
About ImportSourceCredentials¶
Imports the source repository credentials for an CodeBuild project that has its source code stored in a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket repository.
Method Signature¶
METHODS /AWS1/IF_BLD~IMPORTSOURCECREDENTIALS
IMPORTING
!IV_USERNAME TYPE /AWS1/BLDNONEMPTYSTRING OPTIONAL
!IV_TOKEN TYPE /AWS1/BLDSENSITIVENONEMPTYSTR OPTIONAL
!IV_SERVERTYPE TYPE /AWS1/BLDSERVERTYPE OPTIONAL
!IV_AUTHTYPE TYPE /AWS1/BLDAUTHTYPE OPTIONAL
!IV_SHOULDOVERWRITE TYPE /AWS1/BLDWRAPPERBOOLEAN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_bldimpsrccredsoutput
RAISING
/AWS1/CX_BLDACCOUNTLIMITEXCDEX
/AWS1/CX_BLDINVALIDINPUTEX
/AWS1/CX_BLDRESRCALRDYEXISTSEX
/AWS1/CX_BLDCLIENTEXC
/AWS1/CX_BLDSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_token TYPE /AWS1/BLDSENSITIVENONEMPTYSTR /AWS1/BLDSENSITIVENONEMPTYSTR¶
For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket, this is either the access token or the app password. For the
authTypeCODECONNECTIONS, this is theconnectionArn. For theauthTypeSECRETS_MANAGER, this is thesecretArn.
iv_servertype TYPE /AWS1/BLDSERVERTYPE /AWS1/BLDSERVERTYPE¶
The source provider used for this project.
iv_authtype TYPE /AWS1/BLDAUTHTYPE /AWS1/BLDAUTHTYPE¶
The type of authentication used to connect to a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket repository. An OAUTH connection is not supported by the API and must be created using the CodeBuild console.
Optional arguments:¶
iv_username TYPE /AWS1/BLDNONEMPTYSTRING /AWS1/BLDNONEMPTYSTRING¶
The Bitbucket username when the
authTypeis BASIC_AUTH. This parameter is not valid for other types of source providers or connections.
iv_shouldoverwrite TYPE /AWS1/BLDWRAPPERBOOLEAN /AWS1/BLDWRAPPERBOOLEAN¶
Set to
falseto prevent overwriting the repository source credentials. Set totrueto overwrite the repository source credentials. The default value istrue.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_bldimpsrccredsoutput /AWS1/CL_BLDIMPSRCCREDSOUTPUT¶
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->importsourcecredentials(
iv_authtype = |string|
iv_servertype = |string|
iv_shouldoverwrite = ABAP_TRUE
iv_token = |string|
iv_username = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_nonemptystring = lo_result->get_arn( ).
ENDIF.