<reponame>zchase/pulumi-awsx-go// *** WARNING: this file was generated by Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.AwsxGo.Ecr
{
    /// <summary>
    /// A [Repository] represents an [aws.ecr.Repository] along with an associated [LifecyclePolicy] controlling how images are retained in the repo.
    /// 
    /// Docker images can be built and pushed to the repo using the [buildAndPushImage] method.  This will call into the `@pulumi/docker/buildAndPushImage` function using this repo as the appropriate destination registry.
    /// </summary>
    [AwsxGoResourceType("awsx-go:ecr:Repository")]
    public partial class Repository : Pulumi.ComponentResource
    {
        /// <summary>
        /// Underlying repository lifecycle policy
        /// </summary>
        [Output("lifecyclePolicy")]
        public Output<Pulumi.Aws.Ecr.LifecyclePolicy?> LifecyclePolicy { get; private set; } = null!;

        /// <summary>
        /// Underlying Repository resource
        /// </summary>
        [Output("repository")]
        public Output<Pulumi.Aws.Ecr.Repository> AwsRepository { get; private set; } = null!;

        /// <summary>
        /// The URL of the repository (in the form aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName).
        /// </summary>
        [Output("url")]
        public Output<string> Url { get; private set; } = null!;


        /// <summary>
        /// Create a Repository resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public Repository(string name, RepositoryArgs? args = null, ComponentResourceOptions? options = null)
            : base("awsx-go:ecr:Repository", name, args ?? new RepositoryArgs(), MakeResourceOptions(options, ""), remote: true)
        {
        }

        private static ComponentResourceOptions MakeResourceOptions(ComponentResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new ComponentResourceOptions
            {
                Version = Utilities.Version,
            };
            var merged = ComponentResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
    }

    public sealed class RepositoryArgs : Pulumi.ResourceArgs
    {
        [Input("encryptionConfigurations")]
        private InputList<Pulumi.Aws.Ecr.Inputs.RepositoryEncryptionConfigurationArgs>? _encryptionConfigurations;

        /// <summary>
        /// Encryption configuration for the repository. See below for schema.
        /// </summary>
        public InputList<Pulumi.Aws.Ecr.Inputs.RepositoryEncryptionConfigurationArgs> EncryptionConfigurations
        {
            get => _encryptionConfigurations ?? (_encryptionConfigurations = new InputList<Pulumi.Aws.Ecr.Inputs.RepositoryEncryptionConfigurationArgs>());
            set => _encryptionConfigurations = value;
        }

        /// <summary>
        /// Configuration block that defines image scanning configuration for the repository. By default, image scanning must be manually triggered. See the [ECR User Guide](https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html) for more information about image scanning.
        /// </summary>
        [Input("imageScanningConfiguration")]
        public Input<Pulumi.Aws.Ecr.Inputs.RepositoryImageScanningConfigurationArgs>? ImageScanningConfiguration { get; set; }

        /// <summary>
        /// The tag mutability setting for the repository. Must be one of: `MUTABLE` or `IMMUTABLE`. Defaults to `MUTABLE`.
        /// </summary>
        [Input("imageTagMutability")]
        public Input<string>? ImageTagMutability { get; set; }

        /// <summary>
        /// A lifecycle policy consists of one or more rules that determine which images in a repository should be expired. If not provided, this will default to untagged images expiring after 1 day.
        /// </summary>
        [Input("lifecyclePolicy")]
        public Inputs.LifecyclePolicyArgs? LifecyclePolicy { get; set; }

        /// <summary>
        /// Name of the repository.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("tags")]
        private InputMap<string>? _tags;

        /// <summary>
        /// A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        /// </summary>
        public InputMap<string> Tags
        {
            get => _tags ?? (_tags = new InputMap<string>());
            set => _tags = value;
        }

        public RepositoryArgs()
        {
        }
    }
}
