We recommend using Azure Native.
Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi
azure.automation.getRunbook
Explore with Pulumi AI
Use this data source to access information about an existing Automation Runbook.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.automation.getRunbook({
name: "existing-runbook",
resourceGroupName: "existing",
automationAccountName: "existing-automation",
});
export const id = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.automation.get_runbook(name="existing-runbook",
resource_group_name="existing",
automation_account_name="existing-automation")
pulumi.export("id", example.id)
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := automation.GetRunbook(ctx, &automation.GetRunbookArgs{
Name: "existing-runbook",
ResourceGroupName: "existing",
AutomationAccountName: "existing-automation",
}, nil)
if err != nil {
return err
}
ctx.Export("id", example.Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.Automation.GetRunbook.Invoke(new()
{
Name = "existing-runbook",
ResourceGroupName = "existing",
AutomationAccountName = "existing-automation",
});
return new Dictionary<string, object?>
{
["id"] = example.Apply(getRunbookResult => getRunbookResult.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.automation.AutomationFunctions;
import com.pulumi.azure.automation.inputs.GetRunbookArgs;
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 example = AutomationFunctions.getRunbook(GetRunbookArgs.builder()
.name("existing-runbook")
.resourceGroupName("existing")
.automationAccountName("existing-automation")
.build());
ctx.export("id", example.applyValue(getRunbookResult -> getRunbookResult.id()));
}
}
variables:
example:
fn::invoke:
Function: azure:automation:getRunbook
Arguments:
name: existing-runbook
resourceGroupName: existing
automationAccountName: existing-automation
outputs:
id: ${example.id}
Using getRunbook
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 getRunbook(args: GetRunbookArgs, opts?: InvokeOptions): Promise<GetRunbookResult>
function getRunbookOutput(args: GetRunbookOutputArgs, opts?: InvokeOptions): Output<GetRunbookResult>
def get_runbook(automation_account_name: Optional[str] = None,
name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRunbookResult
def get_runbook_output(automation_account_name: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRunbookResult]
func GetRunbook(ctx *Context, args *GetRunbookArgs, opts ...InvokeOption) (*GetRunbookResult, error)
func GetRunbookOutput(ctx *Context, args *GetRunbookOutputArgs, opts ...InvokeOption) GetRunbookResultOutput
> Note: This function is named GetRunbook
in the Go SDK.
public static class GetRunbook
{
public static Task<GetRunbookResult> InvokeAsync(GetRunbookArgs args, InvokeOptions? opts = null)
public static Output<GetRunbookResult> Invoke(GetRunbookInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRunbookResult> getRunbook(GetRunbookArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure:automation/getRunbook:getRunbook
arguments:
# arguments dictionary
The following arguments are supported:
- Automation
Account stringName - The name of the Automation Account the runbook belongs to.
- Name string
- The name of the Automation Runbook.
- Resource
Group stringName - The name of the Resource Group where the Automation exists.
- Automation
Account stringName - The name of the Automation Account the runbook belongs to.
- Name string
- The name of the Automation Runbook.
- Resource
Group stringName - The name of the Resource Group where the Automation exists.
- automation
Account StringName - The name of the Automation Account the runbook belongs to.
- name String
- The name of the Automation Runbook.
- resource
Group StringName - The name of the Resource Group where the Automation exists.
- automation
Account stringName - The name of the Automation Account the runbook belongs to.
- name string
- The name of the Automation Runbook.
- resource
Group stringName - The name of the Resource Group where the Automation exists.
- automation_
account_ strname - The name of the Automation Account the runbook belongs to.
- name str
- The name of the Automation Runbook.
- resource_
group_ strname - The name of the Resource Group where the Automation exists.
- automation
Account StringName - The name of the Automation Account the runbook belongs to.
- name String
- The name of the Automation Runbook.
- resource
Group StringName - The name of the Resource Group where the Automation exists.
getRunbook Result
The following output properties are available:
- Automation
Account stringName - Content string
- The content of the Runbook.
- Description string
- The description of the Runbook.
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- The Azure Region where the Runbook exists.
- Log
Activity intTrace Level - The activity-level tracing of the Runbook.
- Log
Progress bool - The Progress log option of the Runbook.
- Log
Verbose bool - The Verbose log option of the Runbook.
- Name string
- Resource
Group stringName - Runbook
Type string - The type of Runbook.
- Dictionary<string, string>
- A mapping of tags assigned to the Runbook.
- Automation
Account stringName - Content string
- The content of the Runbook.
- Description string
- The description of the Runbook.
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- The Azure Region where the Runbook exists.
- Log
Activity intTrace Level - The activity-level tracing of the Runbook.
- Log
Progress bool - The Progress log option of the Runbook.
- Log
Verbose bool - The Verbose log option of the Runbook.
- Name string
- Resource
Group stringName - Runbook
Type string - The type of Runbook.
- map[string]string
- A mapping of tags assigned to the Runbook.
- automation
Account StringName - content String
- The content of the Runbook.
- description String
- The description of the Runbook.
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- The Azure Region where the Runbook exists.
- log
Activity IntegerTrace Level - The activity-level tracing of the Runbook.
- log
Progress Boolean - The Progress log option of the Runbook.
- log
Verbose Boolean - The Verbose log option of the Runbook.
- name String
- resource
Group StringName - runbook
Type String - The type of Runbook.
- Map<String,String>
- A mapping of tags assigned to the Runbook.
- automation
Account stringName - content string
- The content of the Runbook.
- description string
- The description of the Runbook.
- id string
- The provider-assigned unique ID for this managed resource.
- location string
- The Azure Region where the Runbook exists.
- log
Activity numberTrace Level - The activity-level tracing of the Runbook.
- log
Progress boolean - The Progress log option of the Runbook.
- log
Verbose boolean - The Verbose log option of the Runbook.
- name string
- resource
Group stringName - runbook
Type string - The type of Runbook.
- {[key: string]: string}
- A mapping of tags assigned to the Runbook.
- automation_
account_ strname - content str
- The content of the Runbook.
- description str
- The description of the Runbook.
- id str
- The provider-assigned unique ID for this managed resource.
- location str
- The Azure Region where the Runbook exists.
- log_
activity_ inttrace_ level - The activity-level tracing of the Runbook.
- log_
progress bool - The Progress log option of the Runbook.
- log_
verbose bool - The Verbose log option of the Runbook.
- name str
- resource_
group_ strname - runbook_
type str - The type of Runbook.
- Mapping[str, str]
- A mapping of tags assigned to the Runbook.
- automation
Account StringName - content String
- The content of the Runbook.
- description String
- The description of the Runbook.
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- The Azure Region where the Runbook exists.
- log
Activity NumberTrace Level - The activity-level tracing of the Runbook.
- log
Progress Boolean - The Progress log option of the Runbook.
- log
Verbose Boolean - The Verbose log option of the Runbook.
- name String
- resource
Group StringName - runbook
Type String - The type of Runbook.
- Map<String>
- A mapping of tags assigned to the Runbook.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.