import_source_credentials
¶
import_source_credentials(
token: SensitiveNonEmptyString,
server_type: ServerType,
auth_type: AuthType,
*,
config_overrides: Optional[CodeBuildClientConfig] = None,
username: Optional[NonEmptyString] = None,
should_overwrite: Optional[WrapperBoolean] = None,
) -> ImportSourceCredentialsOutput
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.
Parameters:
-
username(Optional[NonEmptyString], default:None) –The Bitbucket username when the
authTypeis BASIC_AUTH. This parameter is not valid for other types of source providers or connections. -
token(SensitiveNonEmptyString) –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. -
server_type(ServerType) –The source provider used for this project.
-
auth_type(AuthType) –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.
-
should_overwrite(Optional[WrapperBoolean], default:None) –Set to
falseto prevent overwriting the repository source credentials. Set totrueto overwrite the repository source credentials. The default value istrue.
Raises:
-
AccountLimitExceededException–An Amazon Web Services service limit was exceeded for the calling Amazon Web Services account.
-
InvalidInputException–The input value that was provided is not valid.
-
ResourceAlreadyExistsException–The specified Amazon Web Services resource cannot be created, because an Amazon Web Services resource with the same settings already exists.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_codebuild/_services/code_build.py
1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 | |