ExternalScmConfiguration

class oci.adm.models.ExternalScmConfiguration(**kwargs)

Bases: oci.adm.models.scm_configuration.ScmConfiguration

An external SCM configuration extends a SCM Configuration with necessary data to reach and use the Source Code Management tool/platform used by a Remediation Recipe. An external SCM in ADM refers to GitHub, or GitLab.

Attributes

EXTERNAL_SCM_TYPE_GITHUB A constant which can be used with the external_scm_type property of a ExternalScmConfiguration.
EXTERNAL_SCM_TYPE_GITLAB A constant which can be used with the external_scm_type property of a ExternalScmConfiguration.
SCM_TYPE_EXTERNAL_SCM str(object=’’) -> str
SCM_TYPE_OCI_CODE_REPOSITORY str(object=’’) -> str
branch [Required] Gets the branch of this ScmConfiguration.
build_file_location Gets the build_file_location of this ScmConfiguration.
external_scm_type [Required] Gets the external_scm_type of this ExternalScmConfiguration.
is_automerge_enabled [Required] Gets the is_automerge_enabled of this ScmConfiguration.
pat_secret_id [Required] Gets the pat_secret_id of this ExternalScmConfiguration.
repository_url [Required] Gets the repository_url of this ExternalScmConfiguration.
scm_type [Required] Gets the scm_type of this ScmConfiguration.
username Gets the username of this ExternalScmConfiguration.

Methods

__init__(**kwargs) Initializes a new ExternalScmConfiguration object with values from keyword arguments.
get_subtype(object_dictionary) Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
EXTERNAL_SCM_TYPE_GITHUB = 'GITHUB'

A constant which can be used with the external_scm_type property of a ExternalScmConfiguration. This constant has a value of “GITHUB”

EXTERNAL_SCM_TYPE_GITLAB = 'GITLAB'

A constant which can be used with the external_scm_type property of a ExternalScmConfiguration. This constant has a value of “GITLAB”

SCM_TYPE_EXTERNAL_SCM = 'EXTERNAL_SCM'
SCM_TYPE_OCI_CODE_REPOSITORY = 'OCI_CODE_REPOSITORY'
__init__(**kwargs)

Initializes a new ExternalScmConfiguration object with values from keyword arguments. The default value of the scm_type attribute of this class is EXTERNAL_SCM and it should not be changed. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • scm_type (str) – The value to assign to the scm_type property of this ExternalScmConfiguration. Allowed values for this property are: “OCI_CODE_REPOSITORY”, “EXTERNAL_SCM”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • branch (str) – The value to assign to the branch property of this ExternalScmConfiguration.
  • build_file_location (str) – The value to assign to the build_file_location property of this ExternalScmConfiguration.
  • is_automerge_enabled (bool) – The value to assign to the is_automerge_enabled property of this ExternalScmConfiguration.
  • external_scm_type (str) – The value to assign to the external_scm_type property of this ExternalScmConfiguration. Allowed values for this property are: “GITHUB”, “GITLAB”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • repository_url (str) – The value to assign to the repository_url property of this ExternalScmConfiguration.
  • username (str) – The value to assign to the username property of this ExternalScmConfiguration.
  • pat_secret_id (str) – The value to assign to the pat_secret_id property of this ExternalScmConfiguration.
branch

[Required] Gets the branch of this ScmConfiguration. The branch used by ADM to patch vulnerabilities.

Returns:The branch of this ScmConfiguration.
Return type:str
build_file_location

Gets the build_file_location of this ScmConfiguration. The location of the build file relative to the root of the repository. Only Maven build files (POM) are currently supported. If this property is not specified, ADM will use the build file located at the root of the repository.

Returns:The build_file_location of this ScmConfiguration.
Return type:str
external_scm_type

[Required] Gets the external_scm_type of this ExternalScmConfiguration. The type of External Source Code Management.

Allowed values for this property are: “GITHUB”, “GITLAB”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The external_scm_type of this ExternalScmConfiguration.
Return type:str
static get_subtype(object_dictionary)

Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.

is_automerge_enabled

[Required] Gets the is_automerge_enabled of this ScmConfiguration. If true, the Pull Request (PR) will be merged after the verify stage completes successfully If false, the PR with the proposed changes must be reviewed and manually merged.

Returns:The is_automerge_enabled of this ScmConfiguration.
Return type:bool
pat_secret_id

[Required] Gets the pat_secret_id of this ExternalScmConfiguration. The Oracle Cloud Identifier (OCID) of the Private Access Token (PAT) Secret. The secret provides the credentials necessary to authenticate against the SCM.

Returns:The pat_secret_id of this ExternalScmConfiguration.
Return type:str
repository_url

[Required] Gets the repository_url of this ExternalScmConfiguration. The repository URL for the SCM. For Non-Enterprise GitHub the expected format is https://github.com/[owner]/[repoName] For Enterprise GitHub the expected format is http(s)://[hostname]/api/v3/repos/[owner]/[repoName] For GitLab the expected format is https://gitlab.com/[groupName]/[repoName]

Returns:The repository_url of this ExternalScmConfiguration.
Return type:str
scm_type

[Required] Gets the scm_type of this ScmConfiguration. The type of Source Code Management.

Allowed values for this property are: “OCI_CODE_REPOSITORY”, “EXTERNAL_SCM”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The scm_type of this ScmConfiguration.
Return type:str
username

Gets the username of this ExternalScmConfiguration. The username for the SCM (to perform operations such as cloning or pushing via HTTP).

Returns:The username of this ExternalScmConfiguration.
Return type:str