com.pulumi.github.ActionsVariable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of github Show documentation
Show all versions of github Show documentation
A Pulumi package for creating and managing github cloud resources.
// *** 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.github;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import com.pulumi.github.ActionsVariableArgs;
import com.pulumi.github.Utilities;
import com.pulumi.github.inputs.ActionsVariableState;
import java.lang.String;
import javax.annotation.Nullable;
/**
* This resource allows you to create and manage GitHub Actions variables within your GitHub repositories.
* You must have write access to a repository to use this resource.
*
* ## Example Usage
* ```java
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.github.ActionsVariable;
* import com.pulumi.github.ActionsVariableArgs;
* 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 exampleVariable = new ActionsVariable("exampleVariable", ActionsVariableArgs.builder()
* .repository("example_repository")
* .value("example_variable_value")
* .variableName("example_variable_name")
* .build());
*
* }
* }
* ```
*
* ## Import
*
* GitHub Actions variables can be imported using an ID made up of `repository:variable_name`, e.g.
*
* ```sh
* $ pulumi import github:index/actionsVariable:ActionsVariable myvariable myrepo:myvariable
* ```
*
*/
@ResourceType(type="github:index/actionsVariable:ActionsVariable")
public class ActionsVariable extends com.pulumi.resources.CustomResource {
/**
* Date of actions_variable creation.
*
*/
@Export(name="createdAt", refs={String.class}, tree="[0]")
private Output createdAt;
/**
* @return Date of actions_variable creation.
*
*/
public Output createdAt() {
return this.createdAt;
}
/**
* Name of the repository
*
*/
@Export(name="repository", refs={String.class}, tree="[0]")
private Output repository;
/**
* @return Name of the repository
*
*/
public Output repository() {
return this.repository;
}
/**
* Date of actions_variable update.
*
*/
@Export(name="updatedAt", refs={String.class}, tree="[0]")
private Output updatedAt;
/**
* @return Date of actions_variable update.
*
*/
public Output updatedAt() {
return this.updatedAt;
}
/**
* Value of the variable
*
*/
@Export(name="value", refs={String.class}, tree="[0]")
private Output value;
/**
* @return Value of the variable
*
*/
public Output value() {
return this.value;
}
/**
* Name of the variable
*
*/
@Export(name="variableName", refs={String.class}, tree="[0]")
private Output variableName;
/**
* @return Name of the variable
*
*/
public Output variableName() {
return this.variableName;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public ActionsVariable(String name) {
this(name, ActionsVariableArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public ActionsVariable(String name, ActionsVariableArgs 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 ActionsVariable(String name, ActionsVariableArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("github:index/actionsVariable:ActionsVariable", name, args == null ? ActionsVariableArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
}
private ActionsVariable(String name, Output id, @Nullable ActionsVariableState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("github:index/actionsVariable:ActionsVariable", name, state, makeResourceOptions(options, id));
}
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 ActionsVariable get(String name, Output id, @Nullable ActionsVariableState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new ActionsVariable(name, id, state, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy