<reponame>Regrau/pulumi-yandex// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** 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.Yandex
{
    /// <summary>
    /// Allows management of Yandex Cloud Serverless Containers
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using Yandex = Pulumi.Yandex;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var test_container = new Yandex.ServerlessContainer("test-container", new()
    ///     {
    ///         CoreFraction = 100,
    ///         Cores = 1,
    ///         Description = "any description",
    ///         ExecutionTimeout = "15s",
    ///         Image = new Yandex.Inputs.ServerlessContainerImageArgs
    ///         {
    ///             Url = "cr.yandex/yc/test-image:v1",
    ///         },
    ///         Memory = 256,
    ///         ServiceAccountId = "are1service2account3id",
    ///     });
    /// 
    /// });
    /// ```
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using Yandex = Pulumi.Yandex;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var test_container_with_digest = new Yandex.ServerlessContainer("test-container-with-digest", new()
    ///     {
    ///         Image = new Yandex.Inputs.ServerlessContainerImageArgs
    ///         {
    ///             Digest = "sha256:e1d772fa8795adac847a2420c87d0d2e3d38fb02f168cab8c0b5fe2fb95c47f4",
    ///             Url = "cr.yandex/yc/test-image:v1",
    ///         },
    ///         Memory = 128,
    ///     });
    /// 
    /// });
    /// ```
    /// </summary>
    [YandexResourceType("yandex:index/serverlessContainer:ServerlessContainer")]
    public partial class ServerlessContainer : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Concurrency of Yandex Cloud Serverless Container
        /// </summary>
        [Output("concurrency")]
        public Output<int?> Concurrency { get; private set; } = null!;

        /// <summary>
        /// Core fraction (**0...100**) of the Yandex Cloud Serverless Container
        /// </summary>
        [Output("coreFraction")]
        public Output<int> CoreFraction { get; private set; } = null!;

        [Output("cores")]
        public Output<int?> Cores { get; private set; } = null!;

        /// <summary>
        /// Creation timestamp of the Yandex Cloud Serverless Container
        /// </summary>
        [Output("createdAt")]
        public Output<string> CreatedAt { get; private set; } = null!;

        /// <summary>
        /// Description of the Yandex Cloud Serverless Container
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        /// <summary>
        /// Execution timeout in seconds (**duration format**) for Yandex Cloud Serverless Container
        /// </summary>
        [Output("executionTimeout")]
        public Output<string> ExecutionTimeout { get; private set; } = null!;

        /// <summary>
        /// Folder ID for the Yandex Cloud Serverless Container
        /// </summary>
        [Output("folderId")]
        public Output<string> FolderId { get; private set; } = null!;

        /// <summary>
        /// Revision deployment image for Yandex Cloud Serverless Container
        /// * `image.0.url` (Required) - URL of image that will be deployed as Yandex Cloud Serverless Container
        /// * `image.0.work_dir` - Working directory for Yandex Cloud Serverless Container
        /// * `image.0.digest` - Digest of image that will be deployed as Yandex Cloud Serverless Container.
        /// If presented, should be equal to digest that will be resolved at server side by URL.
        /// Container will be updated on digest change even if `image.0.url` stays the same.
        /// If field not specified then its value will be computed.
        /// * `image.0.command` - List of commands for Yandex Cloud Serverless Container
        /// * `image.0.args` - List of arguments for Yandex Cloud Serverless Container
        /// * `image.0.environment` -  A set of key/value environment variable pairs for Yandex Cloud Serverless Container
        /// </summary>
        [Output("image")]
        public Output<Outputs.ServerlessContainerImage> Image { get; private set; } = null!;

        /// <summary>
        /// A set of key/value label pairs to assign to the Yandex Cloud Serverless Container
        /// </summary>
        [Output("labels")]
        public Output<ImmutableDictionary<string, string>?> Labels { get; private set; } = null!;

        /// <summary>
        /// Memory in megabytes (**aligned to 128MB**) for Yandex Cloud Serverless Container
        /// </summary>
        [Output("memory")]
        public Output<int> Memory { get; private set; } = null!;

        /// <summary>
        /// Yandex Cloud Serverless Container name
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// Last revision ID of the Yandex Cloud Serverless Container
        /// </summary>
        [Output("revisionId")]
        public Output<string> RevisionId { get; private set; } = null!;

        /// <summary>
        /// Secrets for Yandex Cloud Serverless Container
        /// </summary>
        [Output("secrets")]
        public Output<ImmutableArray<Outputs.ServerlessContainerSecret>> Secrets { get; private set; } = null!;

        /// <summary>
        /// Service account ID for Yandex Cloud Serverless Container
        /// </summary>
        [Output("serviceAccountId")]
        public Output<string?> ServiceAccountId { get; private set; } = null!;

        /// <summary>
        /// Invoke URL for the Yandex Cloud Serverless Container
        /// </summary>
        [Output("url")]
        public Output<string> Url { get; private set; } = null!;


        /// <summary>
        /// Create a ServerlessContainer 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 ServerlessContainer(string name, ServerlessContainerArgs args, CustomResourceOptions? options = null)
            : base("yandex:index/serverlessContainer:ServerlessContainer", name, args ?? new ServerlessContainerArgs(), MakeResourceOptions(options, ""))
        {
        }

        private ServerlessContainer(string name, Input<string> id, ServerlessContainerState? state = null, CustomResourceOptions? options = null)
            : base("yandex:index/serverlessContainer:ServerlessContainer", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "https://github.com/regrau/pulumi-yandex/releases",
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing ServerlessContainer resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static ServerlessContainer Get(string name, Input<string> id, ServerlessContainerState? state = null, CustomResourceOptions? options = null)
        {
            return new ServerlessContainer(name, id, state, options);
        }
    }

    public sealed class ServerlessContainerArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Concurrency of Yandex Cloud Serverless Container
        /// </summary>
        [Input("concurrency")]
        public Input<int>? Concurrency { get; set; }

        /// <summary>
        /// Core fraction (**0...100**) of the Yandex Cloud Serverless Container
        /// </summary>
        [Input("coreFraction")]
        public Input<int>? CoreFraction { get; set; }

        [Input("cores")]
        public Input<int>? Cores { get; set; }

        /// <summary>
        /// Description of the Yandex Cloud Serverless Container
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Execution timeout in seconds (**duration format**) for Yandex Cloud Serverless Container
        /// </summary>
        [Input("executionTimeout")]
        public Input<string>? ExecutionTimeout { get; set; }

        /// <summary>
        /// Folder ID for the Yandex Cloud Serverless Container
        /// </summary>
        [Input("folderId")]
        public Input<string>? FolderId { get; set; }

        /// <summary>
        /// Revision deployment image for Yandex Cloud Serverless Container
        /// * `image.0.url` (Required) - URL of image that will be deployed as Yandex Cloud Serverless Container
        /// * `image.0.work_dir` - Working directory for Yandex Cloud Serverless Container
        /// * `image.0.digest` - Digest of image that will be deployed as Yandex Cloud Serverless Container.
        /// If presented, should be equal to digest that will be resolved at server side by URL.
        /// Container will be updated on digest change even if `image.0.url` stays the same.
        /// If field not specified then its value will be computed.
        /// * `image.0.command` - List of commands for Yandex Cloud Serverless Container
        /// * `image.0.args` - List of arguments for Yandex Cloud Serverless Container
        /// * `image.0.environment` -  A set of key/value environment variable pairs for Yandex Cloud Serverless Container
        /// </summary>
        [Input("image", required: true)]
        public Input<Inputs.ServerlessContainerImageArgs> Image { get; set; } = null!;

        [Input("labels")]
        private InputMap<string>? _labels;

        /// <summary>
        /// A set of key/value label pairs to assign to the Yandex Cloud Serverless Container
        /// </summary>
        public InputMap<string> Labels
        {
            get => _labels ?? (_labels = new InputMap<string>());
            set => _labels = value;
        }

        /// <summary>
        /// Memory in megabytes (**aligned to 128MB**) for Yandex Cloud Serverless Container
        /// </summary>
        [Input("memory", required: true)]
        public Input<int> Memory { get; set; } = null!;

        /// <summary>
        /// Yandex Cloud Serverless Container name
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("secrets")]
        private InputList<Inputs.ServerlessContainerSecretArgs>? _secrets;

        /// <summary>
        /// Secrets for Yandex Cloud Serverless Container
        /// </summary>
        public InputList<Inputs.ServerlessContainerSecretArgs> Secrets
        {
            get => _secrets ?? (_secrets = new InputList<Inputs.ServerlessContainerSecretArgs>());
            set => _secrets = value;
        }

        /// <summary>
        /// Service account ID for Yandex Cloud Serverless Container
        /// </summary>
        [Input("serviceAccountId")]
        public Input<string>? ServiceAccountId { get; set; }

        public ServerlessContainerArgs()
        {
        }
        public static new ServerlessContainerArgs Empty => new ServerlessContainerArgs();
    }

    public sealed class ServerlessContainerState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Concurrency of Yandex Cloud Serverless Container
        /// </summary>
        [Input("concurrency")]
        public Input<int>? Concurrency { get; set; }

        /// <summary>
        /// Core fraction (**0...100**) of the Yandex Cloud Serverless Container
        /// </summary>
        [Input("coreFraction")]
        public Input<int>? CoreFraction { get; set; }

        [Input("cores")]
        public Input<int>? Cores { get; set; }

        /// <summary>
        /// Creation timestamp of the Yandex Cloud Serverless Container
        /// </summary>
        [Input("createdAt")]
        public Input<string>? CreatedAt { get; set; }

        /// <summary>
        /// Description of the Yandex Cloud Serverless Container
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Execution timeout in seconds (**duration format**) for Yandex Cloud Serverless Container
        /// </summary>
        [Input("executionTimeout")]
        public Input<string>? ExecutionTimeout { get; set; }

        /// <summary>
        /// Folder ID for the Yandex Cloud Serverless Container
        /// </summary>
        [Input("folderId")]
        public Input<string>? FolderId { get; set; }

        /// <summary>
        /// Revision deployment image for Yandex Cloud Serverless Container
        /// * `image.0.url` (Required) - URL of image that will be deployed as Yandex Cloud Serverless Container
        /// * `image.0.work_dir` - Working directory for Yandex Cloud Serverless Container
        /// * `image.0.digest` - Digest of image that will be deployed as Yandex Cloud Serverless Container.
        /// If presented, should be equal to digest that will be resolved at server side by URL.
        /// Container will be updated on digest change even if `image.0.url` stays the same.
        /// If field not specified then its value will be computed.
        /// * `image.0.command` - List of commands for Yandex Cloud Serverless Container
        /// * `image.0.args` - List of arguments for Yandex Cloud Serverless Container
        /// * `image.0.environment` -  A set of key/value environment variable pairs for Yandex Cloud Serverless Container
        /// </summary>
        [Input("image")]
        public Input<Inputs.ServerlessContainerImageGetArgs>? Image { get; set; }

        [Input("labels")]
        private InputMap<string>? _labels;

        /// <summary>
        /// A set of key/value label pairs to assign to the Yandex Cloud Serverless Container
        /// </summary>
        public InputMap<string> Labels
        {
            get => _labels ?? (_labels = new InputMap<string>());
            set => _labels = value;
        }

        /// <summary>
        /// Memory in megabytes (**aligned to 128MB**) for Yandex Cloud Serverless Container
        /// </summary>
        [Input("memory")]
        public Input<int>? Memory { get; set; }

        /// <summary>
        /// Yandex Cloud Serverless Container name
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Last revision ID of the Yandex Cloud Serverless Container
        /// </summary>
        [Input("revisionId")]
        public Input<string>? RevisionId { get; set; }

        [Input("secrets")]
        private InputList<Inputs.ServerlessContainerSecretGetArgs>? _secrets;

        /// <summary>
        /// Secrets for Yandex Cloud Serverless Container
        /// </summary>
        public InputList<Inputs.ServerlessContainerSecretGetArgs> Secrets
        {
            get => _secrets ?? (_secrets = new InputList<Inputs.ServerlessContainerSecretGetArgs>());
            set => _secrets = value;
        }

        /// <summary>
        /// Service account ID for Yandex Cloud Serverless Container
        /// </summary>
        [Input("serviceAccountId")]
        public Input<string>? ServiceAccountId { get; set; }

        /// <summary>
        /// Invoke URL for the Yandex Cloud Serverless Container
        /// </summary>
        [Input("url")]
        public Input<string>? Url { get; set; }

        public ServerlessContainerState()
        {
        }
        public static new ServerlessContainerState Empty => new ServerlessContainerState();
    }
}
