All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.automation.SourceControl Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.10.0-alpha.1731737215
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.automation;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.automation.SourceControlArgs;
import com.pulumi.azure.automation.inputs.SourceControlState;
import com.pulumi.azure.automation.outputs.SourceControlSecurity;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages an Automation Source Control.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.automation.Account;
 * import com.pulumi.azure.automation.AccountArgs;
 * import com.pulumi.azure.automation.SourceControl;
 * import com.pulumi.azure.automation.SourceControlArgs;
 * import com.pulumi.azure.automation.inputs.SourceControlSecurityArgs;
 * 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) {
 *         var example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 * 
 *         var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
 *             .name("example-account")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .skuName("Basic")
 *             .build());
 * 
 *         var exampleSourceControl = new SourceControl("exampleSourceControl", SourceControlArgs.builder()
 *             .name("example")
 *             .automationAccountId(exampleAccount.id())
 *             .folderPath("runbook")
 *             .security(SourceControlSecurityArgs.builder()
 *                 .token("ghp_xxx")
 *                 .tokenType("PersonalAccessToken")
 *                 .build())
 *             .repositoryUrl("https://github.com/foo/bat.git")
 *             .sourceControlType("GitHub")
 *             .branch("main")
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Automations can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:automation/sourceControl:SourceControl example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/sourceControls/sc1 * ``` * */ @ResourceType(type="azure:automation/sourceControl:SourceControl") public class SourceControl extends com.pulumi.resources.CustomResource { /** * Whether auto async the Source Control. * */ @Export(name="automaticSync", refs={Boolean.class}, tree="[0]") private Output automaticSync; /** * @return Whether auto async the Source Control. * */ public Output> automaticSync() { return Codegen.optional(this.automaticSync); } /** * The ID of Automation Account to manage this Source Control. Changing this forces a new Automation Source Control to be created. * */ @Export(name="automationAccountId", refs={String.class}, tree="[0]") private Output automationAccountId; /** * @return The ID of Automation Account to manage this Source Control. Changing this forces a new Automation Source Control to be created. * */ public Output automationAccountId() { return this.automationAccountId; } /** * Specify the repo branch of the Source Control. Empty value is valid only for `VsoTfvc`. * */ @Export(name="branch", refs={String.class}, tree="[0]") private Output branch; /** * @return Specify the repo branch of the Source Control. Empty value is valid only for `VsoTfvc`. * */ public Output> branch() { return Codegen.optional(this.branch); } /** * A short description of the Source Control. * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return A short description of the Source Control. * */ public Output> description() { return Codegen.optional(this.description); } /** * The folder path of the source control. This Path must be relative. * */ @Export(name="folderPath", refs={String.class}, tree="[0]") private Output folderPath; /** * @return The folder path of the source control. This Path must be relative. * */ public Output folderPath() { return this.folderPath; } /** * The name which should be used for this Automation Source Control. Changing this forces a new Automation Source Control to be created. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name which should be used for this Automation Source Control. Changing this forces a new Automation Source Control to be created. * */ public Output name() { return this.name; } /** * Whether auto publish the Source Control. Defaults to `true`. * */ @Export(name="publishRunbookEnabled", refs={Boolean.class}, tree="[0]") private Output publishRunbookEnabled; /** * @return Whether auto publish the Source Control. Defaults to `true`. * */ public Output> publishRunbookEnabled() { return Codegen.optional(this.publishRunbookEnabled); } /** * The Repository URL of the source control. * */ @Export(name="repositoryUrl", refs={String.class}, tree="[0]") private Output repositoryUrl; /** * @return The Repository URL of the source control. * */ public Output repositoryUrl() { return this.repositoryUrl; } /** * A `security` block as defined below. * */ @Export(name="security", refs={SourceControlSecurity.class}, tree="[0]") private Output security; /** * @return A `security` block as defined below. * */ public Output security() { return this.security; } /** * The source type of Source Control, possible vaules are `VsoGit`, `VsoTfvc` and `GitHub`, and the value is case sensitive. * */ @Export(name="sourceControlType", refs={String.class}, tree="[0]") private Output sourceControlType; /** * @return The source type of Source Control, possible vaules are `VsoGit`, `VsoTfvc` and `GitHub`, and the value is case sensitive. * */ public Output sourceControlType() { return this.sourceControlType; } /** * * @param name The _unique_ name of the resulting resource. */ public SourceControl(java.lang.String name) { this(name, SourceControlArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public SourceControl(java.lang.String name, SourceControlArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public SourceControl(java.lang.String name, SourceControlArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:automation/sourceControl:SourceControl", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private SourceControl(java.lang.String name, Output id, @Nullable SourceControlState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:automation/sourceControl:SourceControl", name, state, makeResourceOptions(options, id), false); } private static SourceControlArgs makeArgs(SourceControlArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? SourceControlArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static SourceControl get(java.lang.String name, Output id, @Nullable SourceControlState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new SourceControl(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy