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
68
69
70
//! 
//! 
//! ## Import
//! 
//! ### Example
//! 
//! Assuming you created a `config` as follows
//! 
//! #!/bin/bash
//! 
//! printf '{"a":"b"}' | docker config create foo -
//! 
//! prints the id 
//! 
//! 08c26c477474478d971139f750984775a7f019dbe8a2e7f09d66a187c009e66d
//! 
//! you provide the definition for the resource as follows
//! 
//! terraform
//! 
//! resource "docker_config" "foo" {
//! 
//!   name = "foo"
//! 
//!   data = base64encode("{\"a\": \"b\"}")
//! 
//! }
//! 
//! then the import command is as follows
//! 
//! #!/bin/bash
//! 
//! ```sh
//! $ pulumi import docker:index/serviceConfig:ServiceConfig foo 08c26c477474478d971139f750984775a7f019dbe8a2e7f09d66a187c009e66d
//! ```
//! 

#[derive(bon::Builder)]
#[builder(finish_fn = build_struct)]
pub struct ServiceConfigArgs {
    /// Base64-url-safe-encoded config data
    #[builder(into)]
    pub data: pulumi_wasm_rust::Output<String>,
    /// User-defined name of the config
    #[builder(into, default = ::pulumi_wasm_rust::Output::empty())]
    pub name: pulumi_wasm_rust::Output<Option<String>>,
}

pub struct ServiceConfigResult {
    /// Base64-url-safe-encoded config data
    pub data: pulumi_wasm_rust::Output<String>,
    /// User-defined name of the config
    pub name: pulumi_wasm_rust::Output<String>,
}

///
/// Registers a new resource with the given unique name and arguments
///
pub fn create(name: &str, args: ServiceConfigArgs) -> ServiceConfigResult {

    let result = crate::bindings::pulumi::docker::service_config::invoke(name, &crate::bindings::pulumi::docker::service_config::Args {
        data: &args.data.get_inner(),
        name: &args.name.get_inner(),
    });

    ServiceConfigResult {
        data: crate::into_domain(result.data),
        name: crate::into_domain(result.name),
    }
}