create_source_repository_branch
async
¶
create_source_repository_branch(
space_name: NameString,
project_name: NameString,
source_repository_name: SourceRepositoryNameString,
name: SourceRepositoryBranchString,
*,
config_overrides: Optional[AsyncCodeCatalystClientConfig] = None,
head_commit_id: Optional[str] = None,
) -> CreateSourceRepositoryBranchResponse
Creates a branch in a specified source repository in Amazon CodeCatalyst.
This API only creates a branch in a source repository hosted in Amazon CodeCatalyst. You cannot use this API to create a branch in a linked repository.
Parameters:
-
space_name(NameString) –The name of the space.
-
project_name(NameString) –The name of the project in the space.
-
source_repository_name(SourceRepositoryNameString) –The name of the repository where you want to create a branch.
-
name(SourceRepositoryBranchString) –The name for the branch you're creating.
-
head_commit_id(Optional[str], default:None) –The commit ID in an existing branch from which you want to create the new branch.
Raises:
-
AccessDeniedException–The request was denied because you don't have sufficient access to perform this action. Verify that you are a member of a role that allows this action.
-
ConflictException–The request was denied because the requested operation would cause a conflict with the current state of a service resource associated with the request. Another user might have updated the resource. Reload, make sure you have the latest data, and then try again.
-
ResourceNotFoundException–The request was denied because the specified resource was not found. Verify that the spelling is correct and that you have access to the resource.
-
ServiceQuotaExceededException–The request was denied because one or more resources has reached its limits for the tier the space belongs to. Either reduce the number of resources, or change the tier if applicable.
-
ThrottlingException–The request was denied due to request throttling.
-
ValidationException–The request was denied because an input failed to satisfy the constraints specified by the service. Check the spelling and input requirements, and then try again.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_codecatalyst/_services/async_code_catalyst.py
2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 | |