// *** 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;
using Pulumi;

namespace PiersKarsenbarg.Octopusdeploy
{
    /// <summary>
    /// This resource manages Azure subscription accounts in Octopus Deploy.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using System.Linq;
    /// using Pulumi;
    /// using Octopusdeploy = PiersKarsenbarg.Octopusdeploy;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var example = new Octopusdeploy.AzureSubscriptionAccount("example", new()
    ///     {
    ///         SubscriptionId = "00000000-0000-0000-0000-000000000000",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// ```sh
    ///  $ pulumi import octopusdeploy:index/azureSubscriptionAccount:AzureSubscriptionAccount [options] octopusdeploy_azure_subscription_account.&lt;name&gt; &lt;account-id&gt;
    /// ```
    /// </summary>
    [OctopusdeployResourceType("octopusdeploy:index/azureSubscriptionAccount:AzureSubscriptionAccount")]
    public partial class AzureSubscriptionAccount : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The Azure environment associated with this resource. Valid Azure environments are `AzureCloud`, `AzureChinaCloud`, `AzureGermanCloud`, or `AzureUSGovernment`.
        /// </summary>
        [Output("azureEnvironment")]
        public Output<string> AzureEnvironment { get; private set; } = null!;

        [Output("certificate")]
        public Output<string> Certificate { get; private set; } = null!;

        [Output("certificateThumbprint")]
        public Output<string> CertificateThumbprint { get; private set; } = null!;

        /// <summary>
        /// The description of this Azure subscription account.
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        /// <summary>
        /// A list of environment IDs associated with this resource.
        /// </summary>
        [Output("environments")]
        public Output<ImmutableArray<string>> Environments { get; private set; } = null!;

        [Output("managementEndpoint")]
        public Output<string> ManagementEndpoint { get; private set; } = null!;

        /// <summary>
        /// The name of this resource.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// The space ID associated with this resource.
        /// </summary>
        [Output("spaceId")]
        public Output<string> SpaceId { get; private set; } = null!;

        /// <summary>
        /// The storage endpoint suffix associated with this Azure subscription account.
        /// </summary>
        [Output("storageEndpointSuffix")]
        public Output<string> StorageEndpointSuffix { get; private set; } = null!;

        /// <summary>
        /// The subscription ID of this resource.
        /// </summary>
        [Output("subscriptionId")]
        public Output<string> SubscriptionId { get; private set; } = null!;

        /// <summary>
        /// A list of tenant tags associated with this resource.
        /// </summary>
        [Output("tenantTags")]
        public Output<ImmutableArray<string>> TenantTags { get; private set; } = null!;

        /// <summary>
        /// The tenanted deployment mode of the resource. Valid account types are `Untenanted`, `TenantedOrUntenanted`, or `Tenanted`.
        /// </summary>
        [Output("tenantedDeploymentParticipation")]
        public Output<string> TenantedDeploymentParticipation { get; private set; } = null!;

        /// <summary>
        /// A list of tenant IDs associated with this resource.
        /// </summary>
        [Output("tenants")]
        public Output<ImmutableArray<string>> Tenants { get; private set; } = null!;


        /// <summary>
        /// Create a AzureSubscriptionAccount 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 AzureSubscriptionAccount(string name, AzureSubscriptionAccountArgs args, CustomResourceOptions? options = null)
            : base("octopusdeploy:index/azureSubscriptionAccount:AzureSubscriptionAccount", name, args ?? new AzureSubscriptionAccountArgs(), MakeResourceOptions(options, ""))
        {
        }

        private AzureSubscriptionAccount(string name, Input<string> id, AzureSubscriptionAccountState? state = null, CustomResourceOptions? options = null)
            : base("octopusdeploy:index/azureSubscriptionAccount:AzureSubscriptionAccount", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                AdditionalSecretOutputs =
                {
                    "certificate",
                    "certificateThumbprint",
                },
            };
            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 AzureSubscriptionAccount 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 AzureSubscriptionAccount Get(string name, Input<string> id, AzureSubscriptionAccountState? state = null, CustomResourceOptions? options = null)
        {
            return new AzureSubscriptionAccount(name, id, state, options);
        }
    }

    public sealed class AzureSubscriptionAccountArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The Azure environment associated with this resource. Valid Azure environments are `AzureCloud`, `AzureChinaCloud`, `AzureGermanCloud`, or `AzureUSGovernment`.
        /// </summary>
        [Input("azureEnvironment")]
        public Input<string>? AzureEnvironment { get; set; }

        [Input("certificate")]
        private Input<string>? _certificate;
        public Input<string>? Certificate
        {
            get => _certificate;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _certificate = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        [Input("certificateThumbprint")]
        private Input<string>? _certificateThumbprint;
        public Input<string>? CertificateThumbprint
        {
            get => _certificateThumbprint;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _certificateThumbprint = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        /// <summary>
        /// The description of this Azure subscription account.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        [Input("environments")]
        private InputList<string>? _environments;

        /// <summary>
        /// A list of environment IDs associated with this resource.
        /// </summary>
        public InputList<string> Environments
        {
            get => _environments ?? (_environments = new InputList<string>());
            set => _environments = value;
        }

        [Input("managementEndpoint", required: true)]
        public Input<string> ManagementEndpoint { get; set; } = null!;

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

        /// <summary>
        /// The space ID associated with this resource.
        /// </summary>
        [Input("spaceId")]
        public Input<string>? SpaceId { get; set; }

        /// <summary>
        /// The storage endpoint suffix associated with this Azure subscription account.
        /// </summary>
        [Input("storageEndpointSuffix", required: true)]
        public Input<string> StorageEndpointSuffix { get; set; } = null!;

        /// <summary>
        /// The subscription ID of this resource.
        /// </summary>
        [Input("subscriptionId", required: true)]
        public Input<string> SubscriptionId { get; set; } = null!;

        [Input("tenantTags")]
        private InputList<string>? _tenantTags;

        /// <summary>
        /// A list of tenant tags associated with this resource.
        /// </summary>
        public InputList<string> TenantTags
        {
            get => _tenantTags ?? (_tenantTags = new InputList<string>());
            set => _tenantTags = value;
        }

        /// <summary>
        /// The tenanted deployment mode of the resource. Valid account types are `Untenanted`, `TenantedOrUntenanted`, or `Tenanted`.
        /// </summary>
        [Input("tenantedDeploymentParticipation")]
        public Input<string>? TenantedDeploymentParticipation { get; set; }

        [Input("tenants")]
        private InputList<string>? _tenants;

        /// <summary>
        /// A list of tenant IDs associated with this resource.
        /// </summary>
        public InputList<string> Tenants
        {
            get => _tenants ?? (_tenants = new InputList<string>());
            set => _tenants = value;
        }

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

    public sealed class AzureSubscriptionAccountState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The Azure environment associated with this resource. Valid Azure environments are `AzureCloud`, `AzureChinaCloud`, `AzureGermanCloud`, or `AzureUSGovernment`.
        /// </summary>
        [Input("azureEnvironment")]
        public Input<string>? AzureEnvironment { get; set; }

        [Input("certificate")]
        private Input<string>? _certificate;
        public Input<string>? Certificate
        {
            get => _certificate;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _certificate = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        [Input("certificateThumbprint")]
        private Input<string>? _certificateThumbprint;
        public Input<string>? CertificateThumbprint
        {
            get => _certificateThumbprint;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _certificateThumbprint = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        /// <summary>
        /// The description of this Azure subscription account.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        [Input("environments")]
        private InputList<string>? _environments;

        /// <summary>
        /// A list of environment IDs associated with this resource.
        /// </summary>
        public InputList<string> Environments
        {
            get => _environments ?? (_environments = new InputList<string>());
            set => _environments = value;
        }

        [Input("managementEndpoint")]
        public Input<string>? ManagementEndpoint { get; set; }

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

        /// <summary>
        /// The space ID associated with this resource.
        /// </summary>
        [Input("spaceId")]
        public Input<string>? SpaceId { get; set; }

        /// <summary>
        /// The storage endpoint suffix associated with this Azure subscription account.
        /// </summary>
        [Input("storageEndpointSuffix")]
        public Input<string>? StorageEndpointSuffix { get; set; }

        /// <summary>
        /// The subscription ID of this resource.
        /// </summary>
        [Input("subscriptionId")]
        public Input<string>? SubscriptionId { get; set; }

        [Input("tenantTags")]
        private InputList<string>? _tenantTags;

        /// <summary>
        /// A list of tenant tags associated with this resource.
        /// </summary>
        public InputList<string> TenantTags
        {
            get => _tenantTags ?? (_tenantTags = new InputList<string>());
            set => _tenantTags = value;
        }

        /// <summary>
        /// The tenanted deployment mode of the resource. Valid account types are `Untenanted`, `TenantedOrUntenanted`, or `Tenanted`.
        /// </summary>
        [Input("tenantedDeploymentParticipation")]
        public Input<string>? TenantedDeploymentParticipation { get; set; }

        [Input("tenants")]
        private InputList<string>? _tenants;

        /// <summary>
        /// A list of tenant IDs associated with this resource.
        /// </summary>
        public InputList<string> Tenants
        {
            get => _tenants ?? (_tenants = new InputList<string>());
            set => _tenants = value;
        }

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