1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//! Reads the local Docker plugin. The plugin must be installed locally.
//! 
//! ## Example Usage
//! 
//! ### With alias
//! data "docker.Plugin" "by_alias" {
//!   alias = "sample-volume-plugin:latest"
//! }
//! 
//! ### With ID
//! data "docker.Plugin" "by_id" {
//!   id = "e9a9db917b3bfd6706b5d3a66d4bceb9f"
//! }
//! ```

#[derive(bon::Builder)]
#[builder(finish_fn = build_struct)]
pub struct GetPluginArgs {
    /// The alias of the Docker plugin. If the tag is omitted, `:latest` is complemented to the attribute value.
    #[builder(into, default = ::pulumi_wasm_rust::Output::empty())]
    pub alias: pulumi_wasm_rust::Output<Option<String>>,
    /// The ID of the plugin, which has precedence over the `alias` of both are given
    #[builder(into, default = ::pulumi_wasm_rust::Output::empty())]
    pub id: pulumi_wasm_rust::Output<Option<String>>,
}

pub struct GetPluginResult {
    /// The alias of the Docker plugin. If the tag is omitted, `:latest` is complemented to the attribute value.
    pub alias: pulumi_wasm_rust::Output<Option<String>>,
    /// If `true` the plugin is enabled
    pub enabled: pulumi_wasm_rust::Output<bool>,
    /// The environment variables in the form of `KEY=VALUE`, e.g. `DEBUG=0`
    pub envs: pulumi_wasm_rust::Output<Vec<String>>,
    /// If true, grant all permissions necessary to run the plugin
    pub grant_all_permissions: pulumi_wasm_rust::Output<bool>,
    /// The ID of the plugin, which has precedence over the `alias` of both are given
    pub id: pulumi_wasm_rust::Output<Option<String>>,
    /// The plugin name. If the tag is omitted, `:latest` is complemented to the attribute value.
    pub name: pulumi_wasm_rust::Output<String>,
    /// The Docker Plugin Reference
    pub plugin_reference: pulumi_wasm_rust::Output<String>,
}

///
/// Registers a new resource with the given unique name and arguments
///
pub fn invoke(
    args: GetPluginArgs
) -> GetPluginResult {

    let result = crate::bindings::pulumi::docker::get_plugin::invoke(
        &crate::bindings::pulumi::docker::get_plugin::Args {
                alias: &args.alias.get_inner(),
                id: &args.id.get_inner(),
        }
    );

    GetPluginResult {
        alias: crate::into_domain(result.alias),
        enabled: crate::into_domain(result.enabled),
        envs: crate::into_domain(result.envs),
        grant_all_permissions: crate::into_domain(result.grant_all_permissions),
        id: crate::into_domain(result.id),
        name: crate::into_domain(result.name),
        plugin_reference: crate::into_domain(result.plugin_reference),
    }
}