juju 0.19.0 published on Wednesday, Apr 30, 2025 by juju
juju.getModel
Explore with Pulumi AI
A data source representing a Juju Model.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as juju from "@pulumi/juju";
const _this = juju.getModel({
name: "development",
});
import pulumi
import pulumi_juju as juju
this = juju.get_model(name="development")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/juju/juju"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := juju.LookupModel(ctx, &juju.LookupModelArgs{
Name: "development",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Juju = Pulumi.Juju;
return await Deployment.RunAsync(() =>
{
var @this = Juju.GetModel.Invoke(new()
{
Name = "development",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.juju.JujuFunctions;
import com.pulumi.juju.inputs.GetModelArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var this = JujuFunctions.getModel(GetModelArgs.builder()
.name("development")
.build());
}
}
variables:
this:
fn::invoke:
function: juju:getModel
arguments:
name: development
Using getModel
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getModel(args: GetModelArgs, opts?: InvokeOptions): Promise<GetModelResult>
function getModelOutput(args: GetModelOutputArgs, opts?: InvokeOptions): Output<GetModelResult>
def get_model(name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetModelResult
def get_model_output(name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetModelResult]
func LookupModel(ctx *Context, args *LookupModelArgs, opts ...InvokeOption) (*LookupModelResult, error)
func LookupModelOutput(ctx *Context, args *LookupModelOutputArgs, opts ...InvokeOption) LookupModelResultOutput
> Note: This function is named LookupModel
in the Go SDK.
public static class GetModel
{
public static Task<GetModelResult> InvokeAsync(GetModelArgs args, InvokeOptions? opts = null)
public static Output<GetModelResult> Invoke(GetModelInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetModelResult> getModel(GetModelArgs args, InvokeOptions options)
public static Output<GetModelResult> getModel(GetModelArgs args, InvokeOptions options)
fn::invoke:
function: juju:index/getModel:getModel
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- The name of the model.
- Name string
- The name of the model.
- name String
- The name of the model.
- name string
- The name of the model.
- name str
- The name of the model.
- name String
- The name of the model.
getModel Result
The following output properties are available:
Package Details
- Repository
- juju juju/terraform-provider-juju
- License
- Notes
- This Pulumi package is based on the
juju
Terraform Provider.