<reponame>rhysmdnz/pulumi-alicloud-rhys-hacks// *** 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.AliCloud.ApiGateway
{
    /// <summary>
    /// Provides a Api Gateway Backend resource.
    /// 
    /// For information about Api Gateway Backend and how to use it, see [What is Backend](https://www.alibabacloud.com/help/zh/api-gateway/latest/api-doc-cloudapi-2016-07-14-api-doc-createbackend).
    /// 
    /// &gt; **NOTE:** Available in v1.181.0+.
    /// 
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var config = new Config();
    ///     var name1 = config.Get("name1") ?? "tf-testAccBackend";
    ///     var @default = new AliCloud.ApiGateway.Backend("default", new()
    ///     {
    ///         BackendName = @var.Name,
    ///         Description = @var.Name,
    ///         BackendType = "HTTP",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Api Gateway Backend can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:apigateway/backend:Backend example &lt;id&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:apigateway/backend:Backend")]
    public partial class Backend : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The name of the Backend.
        /// </summary>
        [Output("backendName")]
        public Output<string> BackendName { get; private set; } = null!;

        /// <summary>
        /// The type of the Backend. Valid values: `HTTP`, `VPC`, `FC_EVENT`, `FC_HTTP`, `OSS`, `MOCK`.
        /// </summary>
        [Output("backendType")]
        public Output<string> BackendType { get; private set; } = null!;

        /// <summary>
        /// Whether to create an Event bus service association role.
        /// </summary>
        [Output("createEventBridgeServiceLinkedRole")]
        public Output<bool?> CreateEventBridgeServiceLinkedRole { get; private set; } = null!;

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


        /// <summary>
        /// Create a Backend 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 Backend(string name, BackendArgs args, CustomResourceOptions? options = null)
            : base("alicloud:apigateway/backend:Backend", name, args ?? new BackendArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Backend(string name, Input<string> id, BackendState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:apigateway/backend:Backend", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/rhysmdnz/pulumi-alicloud",
            };
            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 Backend 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 Backend Get(string name, Input<string> id, BackendState? state = null, CustomResourceOptions? options = null)
        {
            return new Backend(name, id, state, options);
        }
    }

    public sealed class BackendArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The name of the Backend.
        /// </summary>
        [Input("backendName", required: true)]
        public Input<string> BackendName { get; set; } = null!;

        /// <summary>
        /// The type of the Backend. Valid values: `HTTP`, `VPC`, `FC_EVENT`, `FC_HTTP`, `OSS`, `MOCK`.
        /// </summary>
        [Input("backendType", required: true)]
        public Input<string> BackendType { get; set; } = null!;

        /// <summary>
        /// Whether to create an Event bus service association role.
        /// </summary>
        [Input("createEventBridgeServiceLinkedRole")]
        public Input<bool>? CreateEventBridgeServiceLinkedRole { get; set; }

        /// <summary>
        /// The description of the Backend.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

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

    public sealed class BackendState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The name of the Backend.
        /// </summary>
        [Input("backendName")]
        public Input<string>? BackendName { get; set; }

        /// <summary>
        /// The type of the Backend. Valid values: `HTTP`, `VPC`, `FC_EVENT`, `FC_HTTP`, `OSS`, `MOCK`.
        /// </summary>
        [Input("backendType")]
        public Input<string>? BackendType { get; set; }

        /// <summary>
        /// Whether to create an Event bus service association role.
        /// </summary>
        [Input("createEventBridgeServiceLinkedRole")]
        public Input<bool>? CreateEventBridgeServiceLinkedRole { get; set; }

        /// <summary>
        /// The description of the Backend.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

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