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
2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 | |