1. Packages
  2. Azure Native
  3. API Docs
  4. cache
  5. PatchSchedule
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.75.0 published on Saturday, Nov 30, 2024 by Pulumi

azure-native.cache.PatchSchedule

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.75.0 published on Saturday, Nov 30, 2024 by Pulumi

    Response to put/get patch schedules for Redis cache. Azure REST API version: 2023-04-01. Prior API version in Azure Native 1.x: 2020-06-01.

    Other available API versions: 2023-05-01-preview, 2023-08-01, 2024-03-01, 2024-04-01-preview, 2024-11-01.

    Example Usage

    RedisCachePatchSchedulesCreateOrUpdate

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var patchSchedule = new AzureNative.Cache.PatchSchedule("patchSchedule", new()
        {
            Default = "default",
            Name = "cache1",
            ResourceGroupName = "rg1",
            ScheduleEntries = new[]
            {
                new AzureNative.Cache.Inputs.ScheduleEntryArgs
                {
                    DayOfWeek = AzureNative.Cache.DayOfWeek.Monday,
                    MaintenanceWindow = "PT5H",
                    StartHourUtc = 12,
                },
                new AzureNative.Cache.Inputs.ScheduleEntryArgs
                {
                    DayOfWeek = AzureNative.Cache.DayOfWeek.Tuesday,
                    StartHourUtc = 12,
                },
            },
        });
    
    });
    
    package main
    
    import (
    	cache "github.com/pulumi/pulumi-azure-native-sdk/cache/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cache.NewPatchSchedule(ctx, "patchSchedule", &cache.PatchScheduleArgs{
    			Default:           pulumi.String("default"),
    			Name:              pulumi.String("cache1"),
    			ResourceGroupName: pulumi.String("rg1"),
    			ScheduleEntries: cache.ScheduleEntryArray{
    				&cache.ScheduleEntryArgs{
    					DayOfWeek:         cache.DayOfWeekMonday,
    					MaintenanceWindow: pulumi.String("PT5H"),
    					StartHourUtc:      pulumi.Int(12),
    				},
    				&cache.ScheduleEntryArgs{
    					DayOfWeek:    cache.DayOfWeekTuesday,
    					StartHourUtc: pulumi.Int(12),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.cache.PatchSchedule;
    import com.pulumi.azurenative.cache.PatchScheduleArgs;
    import com.pulumi.azurenative.cache.inputs.ScheduleEntryArgs;
    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 patchSchedule = new PatchSchedule("patchSchedule", PatchScheduleArgs.builder()
                .default_("default")
                .name("cache1")
                .resourceGroupName("rg1")
                .scheduleEntries(            
                    ScheduleEntryArgs.builder()
                        .dayOfWeek("Monday")
                        .maintenanceWindow("PT5H")
                        .startHourUtc(12)
                        .build(),
                    ScheduleEntryArgs.builder()
                        .dayOfWeek("Tuesday")
                        .startHourUtc(12)
                        .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    patch_schedule = azure_native.cache.PatchSchedule("patchSchedule",
        default="default",
        name="cache1",
        resource_group_name="rg1",
        schedule_entries=[
            {
                "day_of_week": azure_native.cache.DayOfWeek.MONDAY,
                "maintenance_window": "PT5H",
                "start_hour_utc": 12,
            },
            {
                "day_of_week": azure_native.cache.DayOfWeek.TUESDAY,
                "start_hour_utc": 12,
            },
        ])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const patchSchedule = new azure_native.cache.PatchSchedule("patchSchedule", {
        "default": "default",
        name: "cache1",
        resourceGroupName: "rg1",
        scheduleEntries: [
            {
                dayOfWeek: azure_native.cache.DayOfWeek.Monday,
                maintenanceWindow: "PT5H",
                startHourUtc: 12,
            },
            {
                dayOfWeek: azure_native.cache.DayOfWeek.Tuesday,
                startHourUtc: 12,
            },
        ],
    });
    
    resources:
      patchSchedule:
        type: azure-native:cache:PatchSchedule
        properties:
          default: default
          name: cache1
          resourceGroupName: rg1
          scheduleEntries:
            - dayOfWeek: Monday
              maintenanceWindow: PT5H
              startHourUtc: 12
            - dayOfWeek: Tuesday
              startHourUtc: 12
    

    Create PatchSchedule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PatchSchedule(name: string, args: PatchScheduleArgs, opts?: CustomResourceOptions);
    @overload
    def PatchSchedule(resource_name: str,
                      args: PatchScheduleArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def PatchSchedule(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      name: Optional[str] = None,
                      resource_group_name: Optional[str] = None,
                      schedule_entries: Optional[Sequence[ScheduleEntryArgs]] = None,
                      default: Optional[str] = None)
    func NewPatchSchedule(ctx *Context, name string, args PatchScheduleArgs, opts ...ResourceOption) (*PatchSchedule, error)
    public PatchSchedule(string name, PatchScheduleArgs args, CustomResourceOptions? opts = null)
    public PatchSchedule(String name, PatchScheduleArgs args)
    public PatchSchedule(String name, PatchScheduleArgs args, CustomResourceOptions options)
    
    type: azure-native:cache:PatchSchedule
    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 PatchScheduleArgs
    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 PatchScheduleArgs
    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 PatchScheduleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PatchScheduleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PatchScheduleArgs
    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 patchScheduleResource = new AzureNative.Cache.PatchSchedule("patchScheduleResource", new()
    {
        Name = "string",
        ResourceGroupName = "string",
        ScheduleEntries = new[]
        {
            new AzureNative.Cache.Inputs.ScheduleEntryArgs
            {
                DayOfWeek = AzureNative.Cache.DayOfWeek.Monday,
                StartHourUtc = 0,
                MaintenanceWindow = "string",
            },
        },
        Default = "string",
    });
    
    example, err := cache.NewPatchSchedule(ctx, "patchScheduleResource", &cache.PatchScheduleArgs{
    	Name:              pulumi.String("string"),
    	ResourceGroupName: pulumi.String("string"),
    	ScheduleEntries: cache.ScheduleEntryArray{
    		&cache.ScheduleEntryArgs{
    			DayOfWeek:         cache.DayOfWeekMonday,
    			StartHourUtc:      pulumi.Int(0),
    			MaintenanceWindow: pulumi.String("string"),
    		},
    	},
    	Default: pulumi.String("string"),
    })
    
    var patchScheduleResource = new PatchSchedule("patchScheduleResource", PatchScheduleArgs.builder()
        .name("string")
        .resourceGroupName("string")
        .scheduleEntries(ScheduleEntryArgs.builder()
            .dayOfWeek("Monday")
            .startHourUtc(0)
            .maintenanceWindow("string")
            .build())
        .default_("string")
        .build());
    
    patch_schedule_resource = azure_native.cache.PatchSchedule("patchScheduleResource",
        name="string",
        resource_group_name="string",
        schedule_entries=[{
            "day_of_week": azure_native.cache.DayOfWeek.MONDAY,
            "start_hour_utc": 0,
            "maintenance_window": "string",
        }],
        default="string")
    
    const patchScheduleResource = new azure_native.cache.PatchSchedule("patchScheduleResource", {
        name: "string",
        resourceGroupName: "string",
        scheduleEntries: [{
            dayOfWeek: azure_native.cache.DayOfWeek.Monday,
            startHourUtc: 0,
            maintenanceWindow: "string",
        }],
        "default": "string",
    });
    
    type: azure-native:cache:PatchSchedule
    properties:
        default: string
        name: string
        resourceGroupName: string
        scheduleEntries:
            - dayOfWeek: Monday
              maintenanceWindow: string
              startHourUtc: 0
    

    PatchSchedule 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 PatchSchedule resource accepts the following input properties:

    Name string
    The name of the Redis cache.
    ResourceGroupName string
    The name of the resource group.
    ScheduleEntries List<Pulumi.AzureNative.Cache.Inputs.ScheduleEntry>
    List of patch schedules for a Redis cache.
    Default string
    Default string modeled as parameter for auto generation to work correctly.
    Name string
    The name of the Redis cache.
    ResourceGroupName string
    The name of the resource group.
    ScheduleEntries []ScheduleEntryArgs
    List of patch schedules for a Redis cache.
    Default string
    Default string modeled as parameter for auto generation to work correctly.
    name String
    The name of the Redis cache.
    resourceGroupName String
    The name of the resource group.
    scheduleEntries List<ScheduleEntry>
    List of patch schedules for a Redis cache.
    default_ String
    Default string modeled as parameter for auto generation to work correctly.
    name string
    The name of the Redis cache.
    resourceGroupName string
    The name of the resource group.
    scheduleEntries ScheduleEntry[]
    List of patch schedules for a Redis cache.
    default string
    Default string modeled as parameter for auto generation to work correctly.
    name str
    The name of the Redis cache.
    resource_group_name str
    The name of the resource group.
    schedule_entries Sequence[ScheduleEntryArgs]
    List of patch schedules for a Redis cache.
    default str
    Default string modeled as parameter for auto generation to work correctly.
    name String
    The name of the Redis cache.
    resourceGroupName String
    The name of the resource group.
    scheduleEntries List<Property Map>
    List of patch schedules for a Redis cache.
    default String
    Default string modeled as parameter for auto generation to work correctly.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PatchSchedule resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    The geo-location where the resource lives
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    The geo-location where the resource lives
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    The geo-location where the resource lives
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    The geo-location where the resource lives
    type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    The geo-location where the resource lives
    type str
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    The geo-location where the resource lives
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

    Supporting Types

    DayOfWeek, DayOfWeekArgs

    Monday
    Monday
    Tuesday
    Tuesday
    Wednesday
    Wednesday
    Thursday
    Thursday
    Friday
    Friday
    Saturday
    Saturday
    Sunday
    Sunday
    Everyday
    Everyday
    Weekend
    Weekend
    DayOfWeekMonday
    Monday
    DayOfWeekTuesday
    Tuesday
    DayOfWeekWednesday
    Wednesday
    DayOfWeekThursday
    Thursday
    DayOfWeekFriday
    Friday
    DayOfWeekSaturday
    Saturday
    DayOfWeekSunday
    Sunday
    DayOfWeekEveryday
    Everyday
    DayOfWeekWeekend
    Weekend
    Monday
    Monday
    Tuesday
    Tuesday
    Wednesday
    Wednesday
    Thursday
    Thursday
    Friday
    Friday
    Saturday
    Saturday
    Sunday
    Sunday
    Everyday
    Everyday
    Weekend
    Weekend
    Monday
    Monday
    Tuesday
    Tuesday
    Wednesday
    Wednesday
    Thursday
    Thursday
    Friday
    Friday
    Saturday
    Saturday
    Sunday
    Sunday
    Everyday
    Everyday
    Weekend
    Weekend
    MONDAY
    Monday
    TUESDAY
    Tuesday
    WEDNESDAY
    Wednesday
    THURSDAY
    Thursday
    FRIDAY
    Friday
    SATURDAY
    Saturday
    SUNDAY
    Sunday
    EVERYDAY
    Everyday
    WEEKEND
    Weekend
    "Monday"
    Monday
    "Tuesday"
    Tuesday
    "Wednesday"
    Wednesday
    "Thursday"
    Thursday
    "Friday"
    Friday
    "Saturday"
    Saturday
    "Sunday"
    Sunday
    "Everyday"
    Everyday
    "Weekend"
    Weekend

    ScheduleEntry, ScheduleEntryArgs

    DayOfWeek Pulumi.AzureNative.Cache.DayOfWeek
    Day of the week when a cache can be patched.
    StartHourUtc int
    Start hour after which cache patching can start.
    MaintenanceWindow string
    ISO8601 timespan specifying how much time cache patching can take.
    DayOfWeek DayOfWeek
    Day of the week when a cache can be patched.
    StartHourUtc int
    Start hour after which cache patching can start.
    MaintenanceWindow string
    ISO8601 timespan specifying how much time cache patching can take.
    dayOfWeek DayOfWeek
    Day of the week when a cache can be patched.
    startHourUtc Integer
    Start hour after which cache patching can start.
    maintenanceWindow String
    ISO8601 timespan specifying how much time cache patching can take.
    dayOfWeek DayOfWeek
    Day of the week when a cache can be patched.
    startHourUtc number
    Start hour after which cache patching can start.
    maintenanceWindow string
    ISO8601 timespan specifying how much time cache patching can take.
    day_of_week DayOfWeek
    Day of the week when a cache can be patched.
    start_hour_utc int
    Start hour after which cache patching can start.
    maintenance_window str
    ISO8601 timespan specifying how much time cache patching can take.
    dayOfWeek "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday" | "Everyday" | "Weekend"
    Day of the week when a cache can be patched.
    startHourUtc Number
    Start hour after which cache patching can start.
    maintenanceWindow String
    ISO8601 timespan specifying how much time cache patching can take.

    ScheduleEntryResponse, ScheduleEntryResponseArgs

    DayOfWeek string
    Day of the week when a cache can be patched.
    StartHourUtc int
    Start hour after which cache patching can start.
    MaintenanceWindow string
    ISO8601 timespan specifying how much time cache patching can take.
    DayOfWeek string
    Day of the week when a cache can be patched.
    StartHourUtc int
    Start hour after which cache patching can start.
    MaintenanceWindow string
    ISO8601 timespan specifying how much time cache patching can take.
    dayOfWeek String
    Day of the week when a cache can be patched.
    startHourUtc Integer
    Start hour after which cache patching can start.
    maintenanceWindow String
    ISO8601 timespan specifying how much time cache patching can take.
    dayOfWeek string
    Day of the week when a cache can be patched.
    startHourUtc number
    Start hour after which cache patching can start.
    maintenanceWindow string
    ISO8601 timespan specifying how much time cache patching can take.
    day_of_week str
    Day of the week when a cache can be patched.
    start_hour_utc int
    Start hour after which cache patching can start.
    maintenance_window str
    ISO8601 timespan specifying how much time cache patching can take.
    dayOfWeek String
    Day of the week when a cache can be patched.
    startHourUtc Number
    Start hour after which cache patching can start.
    maintenanceWindow String
    ISO8601 timespan specifying how much time cache patching can take.

    Import

    An existing resource can be imported using its type token, name, and identifier, e.g.

    $ pulumi import azure-native:cache:PatchSchedule cachename1/default /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/patchSchedules/{default} 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.75.0 published on Saturday, Nov 30, 2024 by Pulumi