// *** 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.CR
{
    /// <summary>
    /// Provides a CR Endpoint Acl Policy resource.
    /// 
    /// For information about CR Endpoint Acl Policy and how to use it, see [What is Endpoint Acl Policy](https://www.alibabacloud.com/help/doc-detail/145275.htm).
    /// 
    /// &gt; **NOTE:** Available in v1.139.0+.
    /// 
    /// ## Import
    /// 
    /// CR Endpoint Acl Policy can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:cr/endpointAclPolicy:EndpointAclPolicy example &lt;instance_id&gt;:&lt;endpoint_type&gt;:&lt;entry&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:cr/endpointAclPolicy:EndpointAclPolicy")]
    public partial class EndpointAclPolicy : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The description of the entry.
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        /// <summary>
        /// The type of endpoint. Valid values: `internet`.
        /// </summary>
        [Output("endpointType")]
        public Output<string> EndpointType { get; private set; } = null!;

        /// <summary>
        /// The IP segment that allowed to access.
        /// </summary>
        [Output("entry")]
        public Output<string> Entry { get; private set; } = null!;

        /// <summary>
        /// The ID of the CR Instance.
        /// </summary>
        [Output("instanceId")]
        public Output<string> InstanceId { get; private set; } = null!;

        /// <summary>
        /// The module that needs to set the access policy. Valid values: `Registry`.
        /// </summary>
        [Output("moduleName")]
        public Output<string?> ModuleName { get; private set; } = null!;


        /// <summary>
        /// Create a EndpointAclPolicy 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 EndpointAclPolicy(string name, EndpointAclPolicyArgs args, CustomResourceOptions? options = null)
            : base("alicloud:cr/endpointAclPolicy:EndpointAclPolicy", name, args ?? new EndpointAclPolicyArgs(), MakeResourceOptions(options, ""))
        {
        }

        private EndpointAclPolicy(string name, Input<string> id, EndpointAclPolicyState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:cr/endpointAclPolicy:EndpointAclPolicy", 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 EndpointAclPolicy 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 EndpointAclPolicy Get(string name, Input<string> id, EndpointAclPolicyState? state = null, CustomResourceOptions? options = null)
        {
            return new EndpointAclPolicy(name, id, state, options);
        }
    }

    public sealed class EndpointAclPolicyArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The description of the entry.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// The type of endpoint. Valid values: `internet`.
        /// </summary>
        [Input("endpointType", required: true)]
        public Input<string> EndpointType { get; set; } = null!;

        /// <summary>
        /// The IP segment that allowed to access.
        /// </summary>
        [Input("entry", required: true)]
        public Input<string> Entry { get; set; } = null!;

        /// <summary>
        /// The ID of the CR Instance.
        /// </summary>
        [Input("instanceId", required: true)]
        public Input<string> InstanceId { get; set; } = null!;

        /// <summary>
        /// The module that needs to set the access policy. Valid values: `Registry`.
        /// </summary>
        [Input("moduleName")]
        public Input<string>? ModuleName { get; set; }

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

    public sealed class EndpointAclPolicyState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The description of the entry.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// The type of endpoint. Valid values: `internet`.
        /// </summary>
        [Input("endpointType")]
        public Input<string>? EndpointType { get; set; }

        /// <summary>
        /// The IP segment that allowed to access.
        /// </summary>
        [Input("entry")]
        public Input<string>? Entry { get; set; }

        /// <summary>
        /// The ID of the CR Instance.
        /// </summary>
        [Input("instanceId")]
        public Input<string>? InstanceId { get; set; }

        /// <summary>
        /// The module that needs to set the access policy. Valid values: `Registry`.
        /// </summary>
        [Input("moduleName")]
        public Input<string>? ModuleName { get; set; }

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