Struct aws_sdk_codeartifact::operation::publish_package_version::builders::PublishPackageVersionFluentBuilder
source · pub struct PublishPackageVersionFluentBuilder { /* private fields */ }
Expand description
Fluent builder constructing a request to PublishPackageVersion
.
Creates a new package version containing one or more assets (or files).
The unfinished
flag can be used to keep the package version in the Unfinished
state until all of its assets have been uploaded (see Package version status in the CodeArtifact user guide). To set the package version’s status to Published
, omit the unfinished
flag when uploading the final asset, or set the status using UpdatePackageVersionStatus. Once a package version’s status is set to Published
, it cannot change back to Unfinished
.
Only generic packages can be published using this API. For more information, see Using generic packages in the CodeArtifact User Guide.
Implementations§
source§impl PublishPackageVersionFluentBuilder
impl PublishPackageVersionFluentBuilder
sourcepub fn as_input(&self) -> &PublishPackageVersionInputBuilder
pub fn as_input(&self) -> &PublishPackageVersionInputBuilder
Access the PublishPackageVersion as a reference.
sourcepub async fn send(
self
) -> Result<PublishPackageVersionOutput, SdkError<PublishPackageVersionError, HttpResponse>>
pub async fn send( self ) -> Result<PublishPackageVersionOutput, SdkError<PublishPackageVersionError, HttpResponse>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn customize(
self
) -> CustomizableOperation<PublishPackageVersionOutput, PublishPackageVersionError, Self>
pub fn customize( self ) -> CustomizableOperation<PublishPackageVersionOutput, PublishPackageVersionError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn domain(self, input: impl Into<String>) -> Self
pub fn domain(self, input: impl Into<String>) -> Self
The name of the domain that contains the repository that contains the package version to publish.
sourcepub fn set_domain(self, input: Option<String>) -> Self
pub fn set_domain(self, input: Option<String>) -> Self
The name of the domain that contains the repository that contains the package version to publish.
sourcepub fn get_domain(&self) -> &Option<String>
pub fn get_domain(&self) -> &Option<String>
The name of the domain that contains the repository that contains the package version to publish.
sourcepub fn domain_owner(self, input: impl Into<String>) -> Self
pub fn domain_owner(self, input: impl Into<String>) -> Self
The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.
sourcepub fn set_domain_owner(self, input: Option<String>) -> Self
pub fn set_domain_owner(self, input: Option<String>) -> Self
The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.
sourcepub fn get_domain_owner(&self) -> &Option<String>
pub fn get_domain_owner(&self) -> &Option<String>
The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.
sourcepub fn repository(self, input: impl Into<String>) -> Self
pub fn repository(self, input: impl Into<String>) -> Self
The name of the repository that the package version will be published to.
sourcepub fn set_repository(self, input: Option<String>) -> Self
pub fn set_repository(self, input: Option<String>) -> Self
The name of the repository that the package version will be published to.
sourcepub fn get_repository(&self) -> &Option<String>
pub fn get_repository(&self) -> &Option<String>
The name of the repository that the package version will be published to.
sourcepub fn format(self, input: PackageFormat) -> Self
pub fn format(self, input: PackageFormat) -> Self
A format that specifies the type of the package version with the requested asset file.
The only supported value is generic
.
sourcepub fn set_format(self, input: Option<PackageFormat>) -> Self
pub fn set_format(self, input: Option<PackageFormat>) -> Self
A format that specifies the type of the package version with the requested asset file.
The only supported value is generic
.
sourcepub fn get_format(&self) -> &Option<PackageFormat>
pub fn get_format(&self) -> &Option<PackageFormat>
A format that specifies the type of the package version with the requested asset file.
The only supported value is generic
.
sourcepub fn namespace(self, input: impl Into<String>) -> Self
pub fn namespace(self, input: impl Into<String>) -> Self
The namespace of the package version to publish.
sourcepub fn set_namespace(self, input: Option<String>) -> Self
pub fn set_namespace(self, input: Option<String>) -> Self
The namespace of the package version to publish.
sourcepub fn get_namespace(&self) -> &Option<String>
pub fn get_namespace(&self) -> &Option<String>
The namespace of the package version to publish.
sourcepub fn package(self, input: impl Into<String>) -> Self
pub fn package(self, input: impl Into<String>) -> Self
The name of the package version to publish.
sourcepub fn set_package(self, input: Option<String>) -> Self
pub fn set_package(self, input: Option<String>) -> Self
The name of the package version to publish.
sourcepub fn get_package(&self) -> &Option<String>
pub fn get_package(&self) -> &Option<String>
The name of the package version to publish.
sourcepub fn package_version(self, input: impl Into<String>) -> Self
pub fn package_version(self, input: impl Into<String>) -> Self
The package version to publish (for example, 3.5.2
).
sourcepub fn set_package_version(self, input: Option<String>) -> Self
pub fn set_package_version(self, input: Option<String>) -> Self
The package version to publish (for example, 3.5.2
).
sourcepub fn get_package_version(&self) -> &Option<String>
pub fn get_package_version(&self) -> &Option<String>
The package version to publish (for example, 3.5.2
).
sourcepub fn asset_content(self, input: ByteStream) -> Self
pub fn asset_content(self, input: ByteStream) -> Self
The content of the asset to publish.
sourcepub fn set_asset_content(self, input: Option<ByteStream>) -> Self
pub fn set_asset_content(self, input: Option<ByteStream>) -> Self
The content of the asset to publish.
sourcepub fn get_asset_content(&self) -> &Option<ByteStream>
pub fn get_asset_content(&self) -> &Option<ByteStream>
The content of the asset to publish.
sourcepub fn asset_name(self, input: impl Into<String>) -> Self
pub fn asset_name(self, input: impl Into<String>) -> Self
The name of the asset to publish. Asset names can include Unicode letters and numbers, and the following special characters: ~ ! @ ^ & ( ) - ` _ + [ ] { } ; , . `
sourcepub fn set_asset_name(self, input: Option<String>) -> Self
pub fn set_asset_name(self, input: Option<String>) -> Self
The name of the asset to publish. Asset names can include Unicode letters and numbers, and the following special characters: ~ ! @ ^ & ( ) - ` _ + [ ] { } ; , . `
sourcepub fn get_asset_name(&self) -> &Option<String>
pub fn get_asset_name(&self) -> &Option<String>
The name of the asset to publish. Asset names can include Unicode letters and numbers, and the following special characters: ~ ! @ ^ & ( ) - ` _ + [ ] { } ; , . `
sourcepub fn asset_sha256(self, input: impl Into<String>) -> Self
pub fn asset_sha256(self, input: impl Into<String>) -> Self
The SHA256 hash of the assetContent
to publish. This value must be calculated by the caller and provided with the request (see Publishing a generic package in the CodeArtifact User Guide).
This value is used as an integrity check to verify that the assetContent
has not changed after it was originally sent.
sourcepub fn set_asset_sha256(self, input: Option<String>) -> Self
pub fn set_asset_sha256(self, input: Option<String>) -> Self
The SHA256 hash of the assetContent
to publish. This value must be calculated by the caller and provided with the request (see Publishing a generic package in the CodeArtifact User Guide).
This value is used as an integrity check to verify that the assetContent
has not changed after it was originally sent.
sourcepub fn get_asset_sha256(&self) -> &Option<String>
pub fn get_asset_sha256(&self) -> &Option<String>
The SHA256 hash of the assetContent
to publish. This value must be calculated by the caller and provided with the request (see Publishing a generic package in the CodeArtifact User Guide).
This value is used as an integrity check to verify that the assetContent
has not changed after it was originally sent.
sourcepub fn unfinished(self, input: bool) -> Self
pub fn unfinished(self, input: bool) -> Self
Specifies whether the package version should remain in the unfinished
state. If omitted, the package version status will be set to Published
(see Package version status in the CodeArtifact User Guide).
Valid values: unfinished
sourcepub fn set_unfinished(self, input: Option<bool>) -> Self
pub fn set_unfinished(self, input: Option<bool>) -> Self
Specifies whether the package version should remain in the unfinished
state. If omitted, the package version status will be set to Published
(see Package version status in the CodeArtifact User Guide).
Valid values: unfinished
sourcepub fn get_unfinished(&self) -> &Option<bool>
pub fn get_unfinished(&self) -> &Option<bool>
Specifies whether the package version should remain in the unfinished
state. If omitted, the package version status will be set to Published
(see Package version status in the CodeArtifact User Guide).
Valid values: unfinished