aws_sdk_ecr/client/
create_repository.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`CreateRepository`](crate::operation::create_repository::builders::CreateRepositoryFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`registry_id(impl Into<String>)`](crate::operation::create_repository::builders::CreateRepositoryFluentBuilder::registry_id) / [`set_registry_id(Option<String>)`](crate::operation::create_repository::builders::CreateRepositoryFluentBuilder::set_registry_id):<br>required: **false**<br><p>The Amazon Web Services account ID associated with the registry to create the repository. If you do not specify a registry, the default registry is assumed.</p><br>
7    ///   - [`repository_name(impl Into<String>)`](crate::operation::create_repository::builders::CreateRepositoryFluentBuilder::repository_name) / [`set_repository_name(Option<String>)`](crate::operation::create_repository::builders::CreateRepositoryFluentBuilder::set_repository_name):<br>required: **true**<br><p>The name to use for the repository. The repository name may be specified on its own (such as <code>nginx-web-app</code>) or it can be prepended with a namespace to group the repository into a category (such as <code>project-a/nginx-web-app</code>).</p> <p>The repository name must start with a letter and can only contain lowercase letters, numbers, hyphens, underscores, and forward slashes.</p><br>
8    ///   - [`tags(Tag)`](crate::operation::create_repository::builders::CreateRepositoryFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_repository::builders::CreateRepositoryFluentBuilder::set_tags):<br>required: **false**<br><p>The metadata that you apply to the repository to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.</p><br>
9    ///   - [`image_tag_mutability(ImageTagMutability)`](crate::operation::create_repository::builders::CreateRepositoryFluentBuilder::image_tag_mutability) / [`set_image_tag_mutability(Option<ImageTagMutability>)`](crate::operation::create_repository::builders::CreateRepositoryFluentBuilder::set_image_tag_mutability):<br>required: **false**<br><p>The tag mutability setting for the repository. If this parameter is omitted, the default setting of <code>MUTABLE</code> will be used which will allow image tags to be overwritten. If <code>IMMUTABLE</code> is specified, all image tags within the repository will be immutable which will prevent them from being overwritten.</p><br>
10    ///   - [`image_scanning_configuration(ImageScanningConfiguration)`](crate::operation::create_repository::builders::CreateRepositoryFluentBuilder::image_scanning_configuration) / [`set_image_scanning_configuration(Option<ImageScanningConfiguration>)`](crate::operation::create_repository::builders::CreateRepositoryFluentBuilder::set_image_scanning_configuration):<br>required: **false**<br><p>The image scanning configuration for the repository. This determines whether images are scanned for known vulnerabilities after being pushed to the repository.</p><br>
11    ///   - [`encryption_configuration(EncryptionConfiguration)`](crate::operation::create_repository::builders::CreateRepositoryFluentBuilder::encryption_configuration) / [`set_encryption_configuration(Option<EncryptionConfiguration>)`](crate::operation::create_repository::builders::CreateRepositoryFluentBuilder::set_encryption_configuration):<br>required: **false**<br><p>The encryption configuration for the repository. This determines how the contents of your repository are encrypted at rest.</p><br>
12    /// - On success, responds with [`CreateRepositoryOutput`](crate::operation::create_repository::CreateRepositoryOutput) with field(s):
13    ///   - [`repository(Option<Repository>)`](crate::operation::create_repository::CreateRepositoryOutput::repository): <p>The repository that was created.</p>
14    /// - On failure, responds with [`SdkError<CreateRepositoryError>`](crate::operation::create_repository::CreateRepositoryError)
15    pub fn create_repository(&self) -> crate::operation::create_repository::builders::CreateRepositoryFluentBuilder {
16        crate::operation::create_repository::builders::CreateRepositoryFluentBuilder::new(self.handle.clone())
17    }
18}