bitbucket.PipelineSchedule
Explore with Pulumi AI
Provides a Bitbucket Pipeline Schedule resource.
This allows you to manage your Pipeline Schedules for a repository.
OAuth2 Scopes: none
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as bitbucket from "@pulumi/bitbucket";
const test = new bitbucket.PipelineSchedule("test", {
workspace: "example",
repository: bitbucket_repository.test.name,
cronPattern: "0 30 * * * ? *",
enabled: true,
target: {
refName: "master",
refType: "branch",
selector: {
pattern: "staging",
},
},
});
import pulumi
import pulumi_bitbucket as bitbucket
test = bitbucket.PipelineSchedule("test",
workspace="example",
repository=bitbucket_repository["test"]["name"],
cron_pattern="0 30 * * * ? *",
enabled=True,
target={
"ref_name": "master",
"ref_type": "branch",
"selector": {
"pattern": "staging",
},
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/bitbucket/v2/bitbucket"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := bitbucket.NewPipelineSchedule(ctx, "test", &bitbucket.PipelineScheduleArgs{
Workspace: pulumi.String("example"),
Repository: pulumi.Any(bitbucket_repository.Test.Name),
CronPattern: pulumi.String("0 30 * * * ? *"),
Enabled: pulumi.Bool(true),
Target: &bitbucket.PipelineScheduleTargetArgs{
RefName: pulumi.String("master"),
RefType: pulumi.String("branch"),
Selector: &bitbucket.PipelineScheduleTargetSelectorArgs{
Pattern: pulumi.String("staging"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Bitbucket = Pulumi.Bitbucket;
return await Deployment.RunAsync(() =>
{
var test = new Bitbucket.PipelineSchedule("test", new()
{
Workspace = "example",
Repository = bitbucket_repository.Test.Name,
CronPattern = "0 30 * * * ? *",
Enabled = true,
Target = new Bitbucket.Inputs.PipelineScheduleTargetArgs
{
RefName = "master",
RefType = "branch",
Selector = new Bitbucket.Inputs.PipelineScheduleTargetSelectorArgs
{
Pattern = "staging",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.bitbucket.PipelineSchedule;
import com.pulumi.bitbucket.PipelineScheduleArgs;
import com.pulumi.bitbucket.inputs.PipelineScheduleTargetArgs;
import com.pulumi.bitbucket.inputs.PipelineScheduleTargetSelectorArgs;
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 test = new PipelineSchedule("test", PipelineScheduleArgs.builder()
.workspace("example")
.repository(bitbucket_repository.test().name())
.cronPattern("0 30 * * * ? *")
.enabled(true)
.target(PipelineScheduleTargetArgs.builder()
.refName("master")
.refType("branch")
.selector(PipelineScheduleTargetSelectorArgs.builder()
.pattern("staging")
.build())
.build())
.build());
}
}
resources:
test:
type: bitbucket:PipelineSchedule
properties:
workspace: example
repository: ${bitbucket_repository.test.name}
cronPattern: 0 30 * * * ? *
enabled: true
target:
refName: master
refType: branch
selector:
pattern: staging
Create PipelineSchedule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PipelineSchedule(name: string, args: PipelineScheduleArgs, opts?: CustomResourceOptions);
@overload
def PipelineSchedule(resource_name: str,
args: PipelineScheduleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PipelineSchedule(resource_name: str,
opts: Optional[ResourceOptions] = None,
cron_pattern: Optional[str] = None,
enabled: Optional[bool] = None,
repository: Optional[str] = None,
target: Optional[PipelineScheduleTargetArgs] = None,
workspace: Optional[str] = None,
pipeline_schedule_id: Optional[str] = None)
func NewPipelineSchedule(ctx *Context, name string, args PipelineScheduleArgs, opts ...ResourceOption) (*PipelineSchedule, error)
public PipelineSchedule(string name, PipelineScheduleArgs args, CustomResourceOptions? opts = null)
public PipelineSchedule(String name, PipelineScheduleArgs args)
public PipelineSchedule(String name, PipelineScheduleArgs args, CustomResourceOptions options)
type: bitbucket:PipelineSchedule
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 PipelineScheduleArgs
- 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 PipelineScheduleArgs
- 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 PipelineScheduleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PipelineScheduleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PipelineScheduleArgs
- 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 pipelineScheduleResource = new Bitbucket.PipelineSchedule("pipelineScheduleResource", new()
{
CronPattern = "string",
Enabled = false,
Repository = "string",
Target = new Bitbucket.Inputs.PipelineScheduleTargetArgs
{
RefName = "string",
RefType = "string",
Selector = new Bitbucket.Inputs.PipelineScheduleTargetSelectorArgs
{
Pattern = "string",
Type = "string",
},
},
Workspace = "string",
PipelineScheduleId = "string",
});
example, err := bitbucket.NewPipelineSchedule(ctx, "pipelineScheduleResource", &bitbucket.PipelineScheduleArgs{
CronPattern: pulumi.String("string"),
Enabled: pulumi.Bool(false),
Repository: pulumi.String("string"),
Target: &bitbucket.PipelineScheduleTargetArgs{
RefName: pulumi.String("string"),
RefType: pulumi.String("string"),
Selector: &bitbucket.PipelineScheduleTargetSelectorArgs{
Pattern: pulumi.String("string"),
Type: pulumi.String("string"),
},
},
Workspace: pulumi.String("string"),
PipelineScheduleId: pulumi.String("string"),
})
var pipelineScheduleResource = new PipelineSchedule("pipelineScheduleResource", PipelineScheduleArgs.builder()
.cronPattern("string")
.enabled(false)
.repository("string")
.target(PipelineScheduleTargetArgs.builder()
.refName("string")
.refType("string")
.selector(PipelineScheduleTargetSelectorArgs.builder()
.pattern("string")
.type("string")
.build())
.build())
.workspace("string")
.pipelineScheduleId("string")
.build());
pipeline_schedule_resource = bitbucket.PipelineSchedule("pipelineScheduleResource",
cron_pattern="string",
enabled=False,
repository="string",
target={
"ref_name": "string",
"ref_type": "string",
"selector": {
"pattern": "string",
"type": "string",
},
},
workspace="string",
pipeline_schedule_id="string")
const pipelineScheduleResource = new bitbucket.PipelineSchedule("pipelineScheduleResource", {
cronPattern: "string",
enabled: false,
repository: "string",
target: {
refName: "string",
refType: "string",
selector: {
pattern: "string",
type: "string",
},
},
workspace: "string",
pipelineScheduleId: "string",
});
type: bitbucket:PipelineSchedule
properties:
cronPattern: string
enabled: false
pipelineScheduleId: string
repository: string
target:
refName: string
refType: string
selector:
pattern: string
type: string
workspace: string
PipelineSchedule 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 PipelineSchedule resource accepts the following input properties:
- Cron
Pattern string - The cron expression that the schedule applies.
- Enabled bool
- Whether the schedule is enabled.
- Repository string
- The Repository to create schedule in.
- Target
Pipeline
Schedule Target - Schedule Target definition. See Target below.
- Workspace string
- The Workspace where the repository resides.
- Pipeline
Schedule stringId
- Cron
Pattern string - The cron expression that the schedule applies.
- Enabled bool
- Whether the schedule is enabled.
- Repository string
- The Repository to create schedule in.
- Target
Pipeline
Schedule Target Args - Schedule Target definition. See Target below.
- Workspace string
- The Workspace where the repository resides.
- Pipeline
Schedule stringId
- cron
Pattern String - The cron expression that the schedule applies.
- enabled Boolean
- Whether the schedule is enabled.
- repository String
- The Repository to create schedule in.
- target
Pipeline
Schedule Target - Schedule Target definition. See Target below.
- workspace String
- The Workspace where the repository resides.
- pipeline
Schedule StringId
- cron
Pattern string - The cron expression that the schedule applies.
- enabled boolean
- Whether the schedule is enabled.
- repository string
- The Repository to create schedule in.
- target
Pipeline
Schedule Target - Schedule Target definition. See Target below.
- workspace string
- The Workspace where the repository resides.
- pipeline
Schedule stringId
- cron_
pattern str - The cron expression that the schedule applies.
- enabled bool
- Whether the schedule is enabled.
- repository str
- The Repository to create schedule in.
- target
Pipeline
Schedule Target Args - Schedule Target definition. See Target below.
- workspace str
- The Workspace where the repository resides.
- pipeline_
schedule_ strid
- cron
Pattern String - The cron expression that the schedule applies.
- enabled Boolean
- Whether the schedule is enabled.
- repository String
- The Repository to create schedule in.
- target Property Map
- Schedule Target definition. See Target below.
- workspace String
- The Workspace where the repository resides.
- pipeline
Schedule StringId
Outputs
All input properties are implicitly available as output properties. Additionally, the PipelineSchedule resource produces the following output properties:
Look up Existing PipelineSchedule Resource
Get an existing PipelineSchedule 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?: PipelineScheduleState, opts?: CustomResourceOptions): PipelineSchedule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cron_pattern: Optional[str] = None,
enabled: Optional[bool] = None,
pipeline_schedule_id: Optional[str] = None,
repository: Optional[str] = None,
target: Optional[PipelineScheduleTargetArgs] = None,
uuid: Optional[str] = None,
workspace: Optional[str] = None) -> PipelineSchedule
func GetPipelineSchedule(ctx *Context, name string, id IDInput, state *PipelineScheduleState, opts ...ResourceOption) (*PipelineSchedule, error)
public static PipelineSchedule Get(string name, Input<string> id, PipelineScheduleState? state, CustomResourceOptions? opts = null)
public static PipelineSchedule get(String name, Output<String> id, PipelineScheduleState state, CustomResourceOptions options)
resources: _: type: bitbucket:PipelineSchedule get: id: ${id}
- 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.
- Cron
Pattern string - The cron expression that the schedule applies.
- Enabled bool
- Whether the schedule is enabled.
- Pipeline
Schedule stringId - Repository string
- The Repository to create schedule in.
- Target
Pipeline
Schedule Target - Schedule Target definition. See Target below.
- Uuid string
- The UUID identifying the schedule.
- Workspace string
- The Workspace where the repository resides.
- Cron
Pattern string - The cron expression that the schedule applies.
- Enabled bool
- Whether the schedule is enabled.
- Pipeline
Schedule stringId - Repository string
- The Repository to create schedule in.
- Target
Pipeline
Schedule Target Args - Schedule Target definition. See Target below.
- Uuid string
- The UUID identifying the schedule.
- Workspace string
- The Workspace where the repository resides.
- cron
Pattern String - The cron expression that the schedule applies.
- enabled Boolean
- Whether the schedule is enabled.
- pipeline
Schedule StringId - repository String
- The Repository to create schedule in.
- target
Pipeline
Schedule Target - Schedule Target definition. See Target below.
- uuid String
- The UUID identifying the schedule.
- workspace String
- The Workspace where the repository resides.
- cron
Pattern string - The cron expression that the schedule applies.
- enabled boolean
- Whether the schedule is enabled.
- pipeline
Schedule stringId - repository string
- The Repository to create schedule in.
- target
Pipeline
Schedule Target - Schedule Target definition. See Target below.
- uuid string
- The UUID identifying the schedule.
- workspace string
- The Workspace where the repository resides.
- cron_
pattern str - The cron expression that the schedule applies.
- enabled bool
- Whether the schedule is enabled.
- pipeline_
schedule_ strid - repository str
- The Repository to create schedule in.
- target
Pipeline
Schedule Target Args - Schedule Target definition. See Target below.
- uuid str
- The UUID identifying the schedule.
- workspace str
- The Workspace where the repository resides.
- cron
Pattern String - The cron expression that the schedule applies.
- enabled Boolean
- Whether the schedule is enabled.
- pipeline
Schedule StringId - repository String
- The Repository to create schedule in.
- target Property Map
- Schedule Target definition. See Target below.
- uuid String
- The UUID identifying the schedule.
- workspace String
- The Workspace where the repository resides.
Supporting Types
PipelineScheduleTarget, PipelineScheduleTargetArgs
- Ref
Name string - The name of the reference.
- Ref
Type string - The type of reference. Valid values are
branch
andtag
. - Selector
Pipeline
Schedule Target Selector - Selector spec. See Selector below.
- Ref
Name string - The name of the reference.
- Ref
Type string - The type of reference. Valid values are
branch
andtag
. - Selector
Pipeline
Schedule Target Selector - Selector spec. See Selector below.
- ref
Name String - The name of the reference.
- ref
Type String - The type of reference. Valid values are
branch
andtag
. - selector
Pipeline
Schedule Target Selector - Selector spec. See Selector below.
- ref
Name string - The name of the reference.
- ref
Type string - The type of reference. Valid values are
branch
andtag
. - selector
Pipeline
Schedule Target Selector - Selector spec. See Selector below.
- ref_
name str - The name of the reference.
- ref_
type str - The type of reference. Valid values are
branch
andtag
. - selector
Pipeline
Schedule Target Selector - Selector spec. See Selector below.
- ref
Name String - The name of the reference.
- ref
Type String - The type of reference. Valid values are
branch
andtag
. - selector Property Map
- Selector spec. See Selector below.
PipelineScheduleTargetSelector, PipelineScheduleTargetSelectorArgs
Import
Pipeline Schedules can be imported using their workspace/repo-slug/uuid
ID, e.g.
$ pulumi import bitbucket:index/pipelineSchedule:PipelineSchedule schedule workspace/repo-slug/uuid
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- bitbucket drfaust92/terraform-provider-bitbucket
- License
- Notes
- This Pulumi package is based on the
bitbucket
Terraform Provider.