1. Packages
  2. Zscaler Internet Access (ZIA)
  3. API Docs
  4. getTimeWindow
Zscaler Internet Access v0.0.7 published on Tuesday, Jul 30, 2024 by Zscaler

zia.getTimeWindow

Explore with Pulumi AI

zia logo
Zscaler Internet Access v0.0.7 published on Tuesday, Jul 30, 2024 by Zscaler

    Use the zia_firewall_filtering_time_window data source to get information about a time window option available in the Zscaler Internet Access cloud firewall. This data source can then be associated with a ZIA firewall filtering rule.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as zia from "@pulumi/zia";
    
    const workHours = zia.getTimeWindow({
        name: "Work hours",
    });
    
    import pulumi
    import pulumi_zia as zia
    
    work_hours = zia.get_time_window(name="Work hours")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/zscaler/pulumi-zia/sdk/go/zia"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := zia.GetTimeWindow(ctx, &zia.GetTimeWindowArgs{
    			Name: pulumi.StringRef("Work hours"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Zia = Pulumi.Zia;
    
    return await Deployment.RunAsync(() => 
    {
        var workHours = Zia.GetTimeWindow.Invoke(new()
        {
            Name = "Work hours",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.zia.ZiaFunctions;
    import com.pulumi.zia.inputs.GetTimeWindowArgs;
    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) {
            final var workHours = ZiaFunctions.getTimeWindow(GetTimeWindowArgs.builder()
                .name("Work hours")
                .build());
    
        }
    }
    
    variables:
      workHours:
        fn::invoke:
          Function: zia:getTimeWindow
          Arguments:
            name: Work hours
    
    import * as pulumi from "@pulumi/pulumi";
    import * as zia from "@pulumi/zia";
    
    const weekends = zia.getTimeWindow({
        name: "Weekends",
    });
    
    import pulumi
    import pulumi_zia as zia
    
    weekends = zia.get_time_window(name="Weekends")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/zscaler/pulumi-zia/sdk/go/zia"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := zia.GetTimeWindow(ctx, &zia.GetTimeWindowArgs{
    			Name: pulumi.StringRef("Weekends"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Zia = Pulumi.Zia;
    
    return await Deployment.RunAsync(() => 
    {
        var weekends = Zia.GetTimeWindow.Invoke(new()
        {
            Name = "Weekends",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.zia.ZiaFunctions;
    import com.pulumi.zia.inputs.GetTimeWindowArgs;
    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) {
            final var weekends = ZiaFunctions.getTimeWindow(GetTimeWindowArgs.builder()
                .name("Weekends")
                .build());
    
        }
    }
    
    variables:
      weekends:
        fn::invoke:
          Function: zia:getTimeWindow
          Arguments:
            name: Weekends
    
    import * as pulumi from "@pulumi/pulumi";
    import * as zia from "@pulumi/zia";
    
    const offHours = zia.getTimeWindow({
        name: "Off hours",
    });
    
    import pulumi
    import pulumi_zia as zia
    
    off_hours = zia.get_time_window(name="Off hours")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/zscaler/pulumi-zia/sdk/go/zia"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := zia.GetTimeWindow(ctx, &zia.GetTimeWindowArgs{
    			Name: pulumi.StringRef("Off hours"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Zia = Pulumi.Zia;
    
    return await Deployment.RunAsync(() => 
    {
        var offHours = Zia.GetTimeWindow.Invoke(new()
        {
            Name = "Off hours",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.zia.ZiaFunctions;
    import com.pulumi.zia.inputs.GetTimeWindowArgs;
    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) {
            final var offHours = ZiaFunctions.getTimeWindow(GetTimeWindowArgs.builder()
                .name("Off hours")
                .build());
    
        }
    }
    
    variables:
      offHours:
        fn::invoke:
          Function: zia:getTimeWindow
          Arguments:
            name: Off hours
    

    Using getTimeWindow

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getTimeWindow(args: GetTimeWindowArgs, opts?: InvokeOptions): Promise<GetTimeWindowResult>
    function getTimeWindowOutput(args: GetTimeWindowOutputArgs, opts?: InvokeOptions): Output<GetTimeWindowResult>
    def get_time_window(name: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetTimeWindowResult
    def get_time_window_output(name: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetTimeWindowResult]
    func GetTimeWindow(ctx *Context, args *GetTimeWindowArgs, opts ...InvokeOption) (*GetTimeWindowResult, error)
    func GetTimeWindowOutput(ctx *Context, args *GetTimeWindowOutputArgs, opts ...InvokeOption) GetTimeWindowResultOutput

    > Note: This function is named GetTimeWindow in the Go SDK.

    public static class GetTimeWindow 
    {
        public static Task<GetTimeWindowResult> InvokeAsync(GetTimeWindowArgs args, InvokeOptions? opts = null)
        public static Output<GetTimeWindowResult> Invoke(GetTimeWindowInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTimeWindowResult> getTimeWindow(GetTimeWindowArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: zia:index/getTimeWindow:getTimeWindow
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the time window to be exported.
    Name string
    The name of the time window to be exported.
    name String
    The name of the time window to be exported.
    name string
    The name of the time window to be exported.
    name str
    The name of the time window to be exported.
    name String
    The name of the time window to be exported.

    getTimeWindow Result

    The following output properties are available:

    DayOfWeeks List<string>
    (String). The supported values are:

    • ANY - (String)
    • NONE - (String)
    • EVERYDAY - (String)
    • SUN - (String)
    • MON - (String)
    • TUE - (String)
    • WED - (String)
    • THU - (String)
    • FRI - (String)
    • SAT - (String)
    EndTime int
    (String)
    Id int
    StartTime int
    (String)
    Name string
    DayOfWeeks []string
    (String). The supported values are:

    • ANY - (String)
    • NONE - (String)
    • EVERYDAY - (String)
    • SUN - (String)
    • MON - (String)
    • TUE - (String)
    • WED - (String)
    • THU - (String)
    • FRI - (String)
    • SAT - (String)
    EndTime int
    (String)
    Id int
    StartTime int
    (String)
    Name string
    dayOfWeeks List<String>
    (String). The supported values are:

    • ANY - (String)
    • NONE - (String)
    • EVERYDAY - (String)
    • SUN - (String)
    • MON - (String)
    • TUE - (String)
    • WED - (String)
    • THU - (String)
    • FRI - (String)
    • SAT - (String)
    endTime Integer
    (String)
    id Integer
    startTime Integer
    (String)
    name String
    dayOfWeeks string[]
    (String). The supported values are:

    • ANY - (String)
    • NONE - (String)
    • EVERYDAY - (String)
    • SUN - (String)
    • MON - (String)
    • TUE - (String)
    • WED - (String)
    • THU - (String)
    • FRI - (String)
    • SAT - (String)
    endTime number
    (String)
    id number
    startTime number
    (String)
    name string
    day_of_weeks Sequence[str]
    (String). The supported values are:

    • ANY - (String)
    • NONE - (String)
    • EVERYDAY - (String)
    • SUN - (String)
    • MON - (String)
    • TUE - (String)
    • WED - (String)
    • THU - (String)
    • FRI - (String)
    • SAT - (String)
    end_time int
    (String)
    id int
    start_time int
    (String)
    name str
    dayOfWeeks List<String>
    (String). The supported values are:

    • ANY - (String)
    • NONE - (String)
    • EVERYDAY - (String)
    • SUN - (String)
    • MON - (String)
    • TUE - (String)
    • WED - (String)
    • THU - (String)
    • FRI - (String)
    • SAT - (String)
    endTime Number
    (String)
    id Number
    startTime Number
    (String)
    name String

    Package Details

    Repository
    zia zscaler/pulumi-zia
    License
    MIT
    Notes
    This Pulumi package is based on the zia Terraform Provider.
    zia logo
    Zscaler Internet Access v0.0.7 published on Tuesday, Jul 30, 2024 by Zscaler