list_packages
¶
list_packages(
domain: DomainName,
repository: RepositoryName,
*,
config_overrides: Optional[codeartifactClientConfig] = None,
domain_owner: Optional[AccountId] = None,
format: Optional[PackageFormat] = None,
namespace: Optional[PackageNamespace] = None,
package_prefix: Optional[PackageName] = None,
max_results: Optional[ListPackagesMaxResults] = None,
next_token: Optional[PaginationToken] = None,
publish: Optional[AllowPublish] = None,
upstream: Optional[AllowUpstream] = None,
) -> ListPackagesResult
Returns a list of PackageSummary objects for packages in a repository that match the request parameters.
Parameters:
-
domain(DomainName) –The name of the domain that contains the repository that contains the requested packages.
-
domain_owner(Optional[AccountId], default:None) –The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
-
repository(RepositoryName) –The name of the repository that contains the requested packages.
-
format(Optional[PackageFormat], default:None) –The format used to filter requested packages. Only packages from the provided format will be returned.
-
namespace(Optional[PackageNamespace], default:None) –The namespace prefix used to filter requested packages. Only packages with a namespace that starts with the provided string value are returned. Note that although this option is called
--namespaceand not--namespace-prefix, it has prefix-matching behavior.Each package format uses namespace as follows:
-
The namespace of a Maven package version is its
groupId. -
The namespace of an npm or Swift package version is its
scope. -
The namespace of a generic package is its
namespace. -
Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.
-
-
package_prefix(Optional[PackageName], default:None) –A prefix used to filter requested packages. Only packages with names that start with
packagePrefixare returned. -
max_results(Optional[ListPackagesMaxResults], default:None) –The maximum number of results to return per page.
-
next_token(Optional[PaginationToken], default:None) –The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
-
publish(Optional[AllowPublish], default:None) –The value of the
Publishpackage origin control restriction used to filter requested packages. Only packages with the provided restriction are returned. For more information, see PackageOriginRestrictions. -
upstream(Optional[AllowUpstream], default:None) –The value of the
Upstreampackage origin control restriction used to filter requested packages. Only packages with the provided restriction are returned. For more information, see PackageOriginRestrictions.
Raises:
-
AccessDeniedException–The operation did not succeed because of an unauthorized access attempt.
-
InternalServerException–The operation did not succeed because of an error that occurred inside CodeArtifact.
-
ResourceNotFoundException–The operation did not succeed because the resource requested is not found in the service.
-
ThrottlingException–The operation did not succeed because too many requests are sent to the service.
-
ValidationException–The operation did not succeed because a parameter in the request was sent with an invalid value.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_codeartifact/_services/codeartifact.py
2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 | |