get_blob_differences
async
¶
get_blob_differences(
repository_name: RepositoryName,
after_blob_id: ObjectId,
*,
config_overrides: Optional[AsyncCodeCommitClientConfig] = None,
before_blob_id: Optional[ObjectId] = None,
context_lines: Optional[DiffContext] = None,
ignore_whitespace: Optional[IgnoreWhiteSpaces] = None,
max_results: Optional[Limit] = None,
next_token: Optional[NextToken] = None,
) -> GetBlobDifferencesOutput
Returns a structured, line-level diff between two blob versions in a repository. The diff is returned as an ordered list of hunks, where each hunk represents a contiguous run of changed lines together with any surrounding unchanged context lines.
Results are paginated. Use MaxResults and NextToken to retrieve additional pages.
For the typical usage workflow, see GetDifferences.
Parameters:
-
repository_name(RepositoryName) –The name of the repository that contains the blobs to compare.
-
after_blob_id(ObjectId) –The ID of the "after" (destination) blob in the diff. Typically the value of
afterBlob.blobIdfrom aDifferenceobject returned by GetDifferences. -
before_blob_id(Optional[ObjectId], default:None) –The ID of the "before" (source) blob in the diff. Typically the value of
beforeBlob.blobIdfrom aDifferenceobject returned by GetDifferences.If you do not specify a value, the operation returns a diff against an empty before-state. This is equivalent to treating the file as newly added.
-
context_lines(Optional[DiffContext], default:None) –The number of unchanged lines of context to include before and after each block of changes in a hunk. Valid values are 0 through 20. Defaults to
3. -
ignore_whitespace(Optional[IgnoreWhiteSpaces], default:None) –Specifies whether to ignore whitespace-only changes when computing the diff. When
true, the operation treats lines that differ only in whitespace as unchanged. Defaults tofalse. -
max_results(Optional[Limit], default:None) –The maximum number of
DiffHunkentries to return in a single response page. Defaults to100. -
next_token(Optional[NextToken], default:None) –An enumeration token that returns the next batch of results when present in a request.
Raises:
-
BlobIdDoesNotExistException–The specified blob does not exist.
-
BlobIdRequiredException–A blob ID is required, but was not specified.
-
EncryptionIntegrityChecksFailedException–An encryption integrity check failed.
-
EncryptionKeyAccessDeniedException–An encryption key could not be accessed.
-
EncryptionKeyDisabledException–The encryption key is disabled.
-
EncryptionKeyNotFoundException–No encryption key was found.
-
EncryptionKeyUnavailableException–The encryption key is not available.
-
FileTooLargeException–The specified file exceeds the file size limit for CodeCommit. For more information about limits in CodeCommit, see Quotas in the CodeCommit User Guide.
-
InvalidBlobIdException–The specified blob is not valid.
-
InvalidContinuationTokenException–The specified continuation token is not valid.
-
InvalidMaxResultsException–The specified number of maximum results is not valid.
-
InvalidRepositoryNameException–A specified repository name is not valid.
This exception occurs only when a specified repository name is not valid. Other exceptions occur when a required repository parameter is missing, or when a specified repository does not exist.
-
RepositoryDoesNotExistException–The specified repository does not exist.
-
RepositoryNameRequiredException–A repository name is required, but was not specified.
-
ValidationException–The specified input is either not valid, or it could not be validated.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_codecommit/_services/async_code_commit.py
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 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 | |