create_source_repository_branch
¶
create_source_repository_branch(
space_name: NameString,
project_name: NameString,
source_repository_name: SourceRepositoryNameString,
name: SourceRepositoryBranchString,
*,
config_overrides: Optional[CodeCatalystClientConfig] = 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/code_catalyst.py
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 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 | |