import_source_credentials
async
¶
import_source_credentials(
token: SensitiveNonEmptyString,
server_type: ServerType,
auth_type: AuthType,
*,
config_overrides: Optional[AsyncCodeBuildClientConfig] = 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/async_code_build.py
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 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 | |