We recommend using Azure Native.
azure.containerservice.RegistryTaskScheduleRunNow
Explore with Pulumi AI
Runs a Container Registry Task Schedule.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-rg",
location: "West Europe",
});
const exampleRegistry = new azure.containerservice.Registry("example", {
name: "example-acr",
resourceGroupName: example.name,
location: example.location,
sku: "Basic",
});
const exampleRegistryTask = new azure.containerservice.RegistryTask("example", {
name: "example-task",
containerRegistryId: exampleRegistry.id,
platform: {
os: "Linux",
},
dockerStep: {
dockerfilePath: "Dockerfile",
contextPath: "https://github.com/<user name>/acr-build-helloworld-node#main",
contextAccessToken: "<github personal access token>",
imageNames: ["helloworld:{{.Run.ID}}"],
},
});
const exampleRegistryTaskScheduleRunNow = new azure.containerservice.RegistryTaskScheduleRunNow("example", {containerRegistryTaskId: exampleRegistryTask.id});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-rg",
location="West Europe")
example_registry = azure.containerservice.Registry("example",
name="example-acr",
resource_group_name=example.name,
location=example.location,
sku="Basic")
example_registry_task = azure.containerservice.RegistryTask("example",
name="example-task",
container_registry_id=example_registry.id,
platform={
"os": "Linux",
},
docker_step={
"dockerfile_path": "Dockerfile",
"context_path": "https://github.com/<user name>/acr-build-helloworld-node#main",
"context_access_token": "<github personal access token>",
"image_names": ["helloworld:{{.Run.ID}}"],
})
example_registry_task_schedule_run_now = azure.containerservice.RegistryTaskScheduleRunNow("example", container_registry_task_id=example_registry_task.id)
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/containerservice"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-rg"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleRegistry, err := containerservice.NewRegistry(ctx, "example", &containerservice.RegistryArgs{
Name: pulumi.String("example-acr"),
ResourceGroupName: example.Name,
Location: example.Location,
Sku: pulumi.String("Basic"),
})
if err != nil {
return err
}
exampleRegistryTask, err := containerservice.NewRegistryTask(ctx, "example", &containerservice.RegistryTaskArgs{
Name: pulumi.String("example-task"),
ContainerRegistryId: exampleRegistry.ID(),
Platform: &containerservice.RegistryTaskPlatformArgs{
Os: pulumi.String("Linux"),
},
DockerStep: &containerservice.RegistryTaskDockerStepArgs{
DockerfilePath: pulumi.String("Dockerfile"),
ContextPath: pulumi.String("https://github.com/<user name>/acr-build-helloworld-node#main"),
ContextAccessToken: pulumi.String("<github personal access token>"),
ImageNames: pulumi.StringArray{
pulumi.String("helloworld:{{.Run.ID}}"),
},
},
})
if err != nil {
return err
}
_, err = containerservice.NewRegistryTaskScheduleRunNow(ctx, "example", &containerservice.RegistryTaskScheduleRunNowArgs{
ContainerRegistryTaskId: exampleRegistryTask.ID(),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-rg",
Location = "West Europe",
});
var exampleRegistry = new Azure.ContainerService.Registry("example", new()
{
Name = "example-acr",
ResourceGroupName = example.Name,
Location = example.Location,
Sku = "Basic",
});
var exampleRegistryTask = new Azure.ContainerService.RegistryTask("example", new()
{
Name = "example-task",
ContainerRegistryId = exampleRegistry.Id,
Platform = new Azure.ContainerService.Inputs.RegistryTaskPlatformArgs
{
Os = "Linux",
},
DockerStep = new Azure.ContainerService.Inputs.RegistryTaskDockerStepArgs
{
DockerfilePath = "Dockerfile",
ContextPath = "https://github.com/<user name>/acr-build-helloworld-node#main",
ContextAccessToken = "<github personal access token>",
ImageNames = new[]
{
"helloworld:{{.Run.ID}}",
},
},
});
var exampleRegistryTaskScheduleRunNow = new Azure.ContainerService.RegistryTaskScheduleRunNow("example", new()
{
ContainerRegistryTaskId = exampleRegistryTask.Id,
});
});
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.containerservice.Registry;
import com.pulumi.azure.containerservice.RegistryArgs;
import com.pulumi.azure.containerservice.RegistryTask;
import com.pulumi.azure.containerservice.RegistryTaskArgs;
import com.pulumi.azure.containerservice.inputs.RegistryTaskPlatformArgs;
import com.pulumi.azure.containerservice.inputs.RegistryTaskDockerStepArgs;
import com.pulumi.azure.containerservice.RegistryTaskScheduleRunNow;
import com.pulumi.azure.containerservice.RegistryTaskScheduleRunNowArgs;
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-rg")
.location("West Europe")
.build());
var exampleRegistry = new Registry("exampleRegistry", RegistryArgs.builder()
.name("example-acr")
.resourceGroupName(example.name())
.location(example.location())
.sku("Basic")
.build());
var exampleRegistryTask = new RegistryTask("exampleRegistryTask", RegistryTaskArgs.builder()
.name("example-task")
.containerRegistryId(exampleRegistry.id())
.platform(RegistryTaskPlatformArgs.builder()
.os("Linux")
.build())
.dockerStep(RegistryTaskDockerStepArgs.builder()
.dockerfilePath("Dockerfile")
.contextPath("https://github.com/<user name>/acr-build-helloworld-node#main")
.contextAccessToken("<github personal access token>")
.imageNames("helloworld:{{.Run.ID}}")
.build())
.build());
var exampleRegistryTaskScheduleRunNow = new RegistryTaskScheduleRunNow("exampleRegistryTaskScheduleRunNow", RegistryTaskScheduleRunNowArgs.builder()
.containerRegistryTaskId(exampleRegistryTask.id())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-rg
location: West Europe
exampleRegistry:
type: azure:containerservice:Registry
name: example
properties:
name: example-acr
resourceGroupName: ${example.name}
location: ${example.location}
sku: Basic
exampleRegistryTask:
type: azure:containerservice:RegistryTask
name: example
properties:
name: example-task
containerRegistryId: ${exampleRegistry.id}
platform:
os: Linux
dockerStep:
dockerfilePath: Dockerfile
contextPath: https://github.com/<user name>/acr-build-helloworld-node#main
contextAccessToken: <github personal access token>
imageNames:
- helloworld:{{.Run.ID}}
exampleRegistryTaskScheduleRunNow:
type: azure:containerservice:RegistryTaskScheduleRunNow
name: example
properties:
containerRegistryTaskId: ${exampleRegistryTask.id}
Create RegistryTaskScheduleRunNow Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RegistryTaskScheduleRunNow(name: string, args: RegistryTaskScheduleRunNowArgs, opts?: CustomResourceOptions);
@overload
def RegistryTaskScheduleRunNow(resource_name: str,
args: RegistryTaskScheduleRunNowArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RegistryTaskScheduleRunNow(resource_name: str,
opts: Optional[ResourceOptions] = None,
container_registry_task_id: Optional[str] = None)
func NewRegistryTaskScheduleRunNow(ctx *Context, name string, args RegistryTaskScheduleRunNowArgs, opts ...ResourceOption) (*RegistryTaskScheduleRunNow, error)
public RegistryTaskScheduleRunNow(string name, RegistryTaskScheduleRunNowArgs args, CustomResourceOptions? opts = null)
public RegistryTaskScheduleRunNow(String name, RegistryTaskScheduleRunNowArgs args)
public RegistryTaskScheduleRunNow(String name, RegistryTaskScheduleRunNowArgs args, CustomResourceOptions options)
type: azure:containerservice:RegistryTaskScheduleRunNow
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args RegistryTaskScheduleRunNowArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args RegistryTaskScheduleRunNowArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RegistryTaskScheduleRunNowArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RegistryTaskScheduleRunNowArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RegistryTaskScheduleRunNowArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var registryTaskScheduleRunNowResource = new Azure.ContainerService.RegistryTaskScheduleRunNow("registryTaskScheduleRunNowResource", new()
{
ContainerRegistryTaskId = "string",
});
example, err := containerservice.NewRegistryTaskScheduleRunNow(ctx, "registryTaskScheduleRunNowResource", &containerservice.RegistryTaskScheduleRunNowArgs{
ContainerRegistryTaskId: pulumi.String("string"),
})
var registryTaskScheduleRunNowResource = new RegistryTaskScheduleRunNow("registryTaskScheduleRunNowResource", RegistryTaskScheduleRunNowArgs.builder()
.containerRegistryTaskId("string")
.build());
registry_task_schedule_run_now_resource = azure.containerservice.RegistryTaskScheduleRunNow("registryTaskScheduleRunNowResource", container_registry_task_id="string")
const registryTaskScheduleRunNowResource = new azure.containerservice.RegistryTaskScheduleRunNow("registryTaskScheduleRunNowResource", {containerRegistryTaskId: "string"});
type: azure:containerservice:RegistryTaskScheduleRunNow
properties:
containerRegistryTaskId: string
RegistryTaskScheduleRunNow Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The RegistryTaskScheduleRunNow resource accepts the following input properties:
- Container
Registry stringTask Id - The ID of the Container Registry Task that to be scheduled. Changing this forces a new Container Registry Task Schedule to be created.
- Container
Registry stringTask Id - The ID of the Container Registry Task that to be scheduled. Changing this forces a new Container Registry Task Schedule to be created.
- container
Registry StringTask Id - The ID of the Container Registry Task that to be scheduled. Changing this forces a new Container Registry Task Schedule to be created.
- container
Registry stringTask Id - The ID of the Container Registry Task that to be scheduled. Changing this forces a new Container Registry Task Schedule to be created.
- container_
registry_ strtask_ id - The ID of the Container Registry Task that to be scheduled. Changing this forces a new Container Registry Task Schedule to be created.
- container
Registry StringTask Id - The ID of the Container Registry Task that to be scheduled. Changing this forces a new Container Registry Task Schedule to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the RegistryTaskScheduleRunNow resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing RegistryTaskScheduleRunNow Resource
Get an existing RegistryTaskScheduleRunNow resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: RegistryTaskScheduleRunNowState, opts?: CustomResourceOptions): RegistryTaskScheduleRunNow
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
container_registry_task_id: Optional[str] = None) -> RegistryTaskScheduleRunNow
func GetRegistryTaskScheduleRunNow(ctx *Context, name string, id IDInput, state *RegistryTaskScheduleRunNowState, opts ...ResourceOption) (*RegistryTaskScheduleRunNow, error)
public static RegistryTaskScheduleRunNow Get(string name, Input<string> id, RegistryTaskScheduleRunNowState? state, CustomResourceOptions? opts = null)
public static RegistryTaskScheduleRunNow get(String name, Output<String> id, RegistryTaskScheduleRunNowState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Container
Registry stringTask Id - The ID of the Container Registry Task that to be scheduled. Changing this forces a new Container Registry Task Schedule to be created.
- Container
Registry stringTask Id - The ID of the Container Registry Task that to be scheduled. Changing this forces a new Container Registry Task Schedule to be created.
- container
Registry StringTask Id - The ID of the Container Registry Task that to be scheduled. Changing this forces a new Container Registry Task Schedule to be created.
- container
Registry stringTask Id - The ID of the Container Registry Task that to be scheduled. Changing this forces a new Container Registry Task Schedule to be created.
- container_
registry_ strtask_ id - The ID of the Container Registry Task that to be scheduled. Changing this forces a new Container Registry Task Schedule to be created.
- container
Registry StringTask Id - The ID of the Container Registry Task that to be scheduled. Changing this forces a new Container Registry Task Schedule to be created.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.