1. Packages
  2. Packages
  3. Powerscale Provider
  4. API Docs
  5. getNtpserver
Viewing docs for powerscale 1.8.1
published on Wednesday, Apr 1, 2026 by dell
Viewing docs for powerscale 1.8.1
published on Wednesday, Apr 1, 2026 by dell

    This datasource is used to query the existing NTP Servers from PowerScale array. The information fetched from this datasource can be used for getting the details or for further processing in resource block. You can use NTP Servers to synchronize the system time

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as powerscale from "@pulumi/powerscale";
    
    //Copyright (c) 2023-2024 Dell Inc., or its subsidiaries. All Rights Reserved.
    //
    //Licensed under the Mozilla Public License Version 2.0 (the "License");
    //you may not use this file except in compliance with the License.
    //You may obtain a copy of the License at
    //
    //    http://mozilla.org/MPL/2.0/
    //
    //
    //Unless required by applicable law or agreed to in writing, software
    //distributed under the License is distributed on an "AS IS" BASIS,
    //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    //See the License for the specific language governing permissions and
    //limitations under the License.
    // This Terraform DataSource is used to query the details of existing NTP servers from PowerScale array.
    // Returns a list of PowerScale NTP servers based on names specified in the filter block.
    const test = powerscale.getNtpserver({
        filter: {
            names: ["ntp_server_name_example"],
        },
    });
    export const powerscaleNtpserver = test;
    // Returns all PowerScale NTP servers on PowerScale array
    const all = powerscale.getNtpserver({});
    export const powerscaleNtpserverDataAll = all;
    
    import pulumi
    import pulumi_powerscale as powerscale
    
    #Copyright (c) 2023-2024 Dell Inc., or its subsidiaries. All Rights Reserved.
    #
    #Licensed under the Mozilla Public License Version 2.0 (the "License");
    #you may not use this file except in compliance with the License.
    #You may obtain a copy of the License at
    #
    #    http://mozilla.org/MPL/2.0/
    #
    #
    #Unless required by applicable law or agreed to in writing, software
    #distributed under the License is distributed on an "AS IS" BASIS,
    #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    #See the License for the specific language governing permissions and
    #limitations under the License.
    # This Terraform DataSource is used to query the details of existing NTP servers from PowerScale array.
    # Returns a list of PowerScale NTP servers based on names specified in the filter block.
    test = powerscale.get_ntpserver(filter={
        "names": ["ntp_server_name_example"],
    })
    pulumi.export("powerscaleNtpserver", test)
    # Returns all PowerScale NTP servers on PowerScale array
    all = powerscale.get_ntpserver()
    pulumi.export("powerscaleNtpserverDataAll", all)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/powerscale/powerscale"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Copyright (c) 2023-2024 Dell Inc., or its subsidiaries. All Rights Reserved.
    		//
    		// Licensed under the Mozilla Public License Version 2.0 (the "License");
    		// you may not use this file except in compliance with the License.
    		// You may obtain a copy of the License at
    		//
    		//	http://mozilla.org/MPL/2.0/
    		//
    		// Unless required by applicable law or agreed to in writing, software
    		// distributed under the License is distributed on an "AS IS" BASIS,
    		// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    		// See the License for the specific language governing permissions and
    		// limitations under the License.
    		// This Terraform DataSource is used to query the details of existing NTP servers from PowerScale array.
    		// Returns a list of PowerScale NTP servers based on names specified in the filter block.
    		test, err := powerscale.LookupNtpserver(ctx, &powerscale.LookupNtpserverArgs{
    			Filter: powerscale.GetNtpserverFilter{
    				Names: []string{
    					"ntp_server_name_example",
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("powerscaleNtpserver", test)
    		// Returns all PowerScale NTP servers on PowerScale array
    		all, err := powerscale.LookupNtpserver(ctx, &powerscale.LookupNtpserverArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("powerscaleNtpserverDataAll", all)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Powerscale = Pulumi.Powerscale;
    
    return await Deployment.RunAsync(() => 
    {
        //Copyright (c) 2023-2024 Dell Inc., or its subsidiaries. All Rights Reserved.
        //
        //Licensed under the Mozilla Public License Version 2.0 (the "License");
        //you may not use this file except in compliance with the License.
        //You may obtain a copy of the License at
        //
        //    http://mozilla.org/MPL/2.0/
        //
        //
        //Unless required by applicable law or agreed to in writing, software
        //distributed under the License is distributed on an "AS IS" BASIS,
        //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        //See the License for the specific language governing permissions and
        //limitations under the License.
        // This Terraform DataSource is used to query the details of existing NTP servers from PowerScale array.
        // Returns a list of PowerScale NTP servers based on names specified in the filter block.
        var test = Powerscale.GetNtpserver.Invoke(new()
        {
            Filter = new Powerscale.Inputs.GetNtpserverFilterInputArgs
            {
                Names = new[]
                {
                    "ntp_server_name_example",
                },
            },
        });
    
        // Returns all PowerScale NTP servers on PowerScale array
        var all = Powerscale.GetNtpserver.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["powerscaleNtpserver"] = test,
            ["powerscaleNtpserverDataAll"] = all,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.powerscale.PowerscaleFunctions;
    import com.pulumi.powerscale.inputs.GetNtpserverArgs;
    import com.pulumi.powerscale.inputs.GetNtpserverFilterArgs;
    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) {
            //Copyright (c) 2023-2024 Dell Inc., or its subsidiaries. All Rights Reserved.
            //
            //Licensed under the Mozilla Public License Version 2.0 (the "License");
            //you may not use this file except in compliance with the License.
            //You may obtain a copy of the License at
            //
            //    http://mozilla.org/MPL/2.0/
            //
            //
            //Unless required by applicable law or agreed to in writing, software
            //distributed under the License is distributed on an "AS IS" BASIS,
            //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
            //See the License for the specific language governing permissions and
            //limitations under the License.
            // This Terraform DataSource is used to query the details of existing NTP servers from PowerScale array.
            // Returns a list of PowerScale NTP servers based on names specified in the filter block.
            final var test = PowerscaleFunctions.getNtpserver(GetNtpserverArgs.builder()
                .filter(GetNtpserverFilterArgs.builder()
                    .names("ntp_server_name_example")
                    .build())
                .build());
    
            ctx.export("powerscaleNtpserver", test);
            // Returns all PowerScale NTP servers on PowerScale array
            final var all = PowerscaleFunctions.getNtpserver(GetNtpserverArgs.builder()
                .build());
    
            ctx.export("powerscaleNtpserverDataAll", all);
        }
    }
    
    variables:
      # /*
      # Copyright (c) 2023-2024 Dell Inc., or its subsidiaries. All Rights Reserved.
    
      # Licensed under the Mozilla Public License Version 2.0 (the "License");
      # you may not use this file except in compliance with the License.
      # You may obtain a copy of the License at
    
      #     http://mozilla.org/MPL/2.0/
    
    
      # Unless required by applicable law or agreed to in writing, software
      # distributed under the License is distributed on an "AS IS" BASIS,
      # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      # See the License for the specific language governing permissions and
      # limitations under the License.
      # */
    
    
      # This Terraform DataSource is used to query the details of existing NTP servers from PowerScale array.
    
      # Returns a list of PowerScale NTP servers based on names specified in the filter block.
      test:
        fn::invoke:
          function: powerscale:getNtpserver
          arguments:
            filter:
              names:
                - ntp_server_name_example
      # Returns all PowerScale NTP servers on PowerScale array
      all:
        fn::invoke:
          function: powerscale:getNtpserver
          arguments: {}
    outputs:
      # Output value of above block by executing 'terraform output' command
      # You can use the the fetched information by the variable data.powerscale_ntpserver.test
      powerscaleNtpserver: ${test}
      # Output value of above block by executing 'terraform output' command
      # You can use the the fetched information by the variable data.powerscale_ntpserver.all
      powerscaleNtpserverDataAll: ${all}
    

    Using getNtpserver

    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 getNtpserver(args: GetNtpserverArgs, opts?: InvokeOptions): Promise<GetNtpserverResult>
    function getNtpserverOutput(args: GetNtpserverOutputArgs, opts?: InvokeOptions): Output<GetNtpserverResult>
    def get_ntpserver(filter: Optional[GetNtpserverFilter] = None,
                      opts: Optional[InvokeOptions] = None) -> GetNtpserverResult
    def get_ntpserver_output(filter: pulumi.Input[Optional[GetNtpserverFilterArgs]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetNtpserverResult]
    func LookupNtpserver(ctx *Context, args *LookupNtpserverArgs, opts ...InvokeOption) (*LookupNtpserverResult, error)
    func LookupNtpserverOutput(ctx *Context, args *LookupNtpserverOutputArgs, opts ...InvokeOption) LookupNtpserverResultOutput

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

    public static class GetNtpserver 
    {
        public static Task<GetNtpserverResult> InvokeAsync(GetNtpserverArgs args, InvokeOptions? opts = null)
        public static Output<GetNtpserverResult> Invoke(GetNtpserverInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNtpserverResult> getNtpserver(GetNtpserverArgs args, InvokeOptions options)
    public static Output<GetNtpserverResult> getNtpserver(GetNtpserverArgs args, InvokeOptions options)
    
    fn::invoke:
      function: powerscale:index/getNtpserver:getNtpserver
      arguments:
        # arguments dictionary

    The following arguments are supported:

    getNtpserver Result

    The following output properties are available:

    Id string
    Unique identifier of the NTP Server instance.
    NtpServersDetails List<GetNtpserverNtpServersDetail>
    List of NTP Servers.
    Filter GetNtpserverFilter
    Id string
    Unique identifier of the NTP Server instance.
    NtpServersDetails []GetNtpserverNtpServersDetail
    List of NTP Servers.
    Filter GetNtpserverFilter
    id String
    Unique identifier of the NTP Server instance.
    ntpServersDetails List<GetNtpserverNtpServersDetail>
    List of NTP Servers.
    filter GetNtpserverFilter
    id string
    Unique identifier of the NTP Server instance.
    ntpServersDetails GetNtpserverNtpServersDetail[]
    List of NTP Servers.
    filter GetNtpserverFilter
    id str
    Unique identifier of the NTP Server instance.
    ntp_servers_details Sequence[GetNtpserverNtpServersDetail]
    List of NTP Servers.
    filter GetNtpserverFilter
    id String
    Unique identifier of the NTP Server instance.
    ntpServersDetails List<Property Map>
    List of NTP Servers.
    filter Property Map

    Supporting Types

    GetNtpserverFilter

    Names List<string>
    Filter NTP Servers by names.
    Names []string
    Filter NTP Servers by names.
    names List<String>
    Filter NTP Servers by names.
    names string[]
    Filter NTP Servers by names.
    names Sequence[str]
    Filter NTP Servers by names.
    names List<String>
    Filter NTP Servers by names.

    GetNtpserverNtpServersDetail

    Id string
    Field ID.
    Key string
    Key value from key_file that maps to this server.
    Name string
    NTP server name.
    Id string
    Field ID.
    Key string
    Key value from key_file that maps to this server.
    Name string
    NTP server name.
    id String
    Field ID.
    key String
    Key value from key_file that maps to this server.
    name String
    NTP server name.
    id string
    Field ID.
    key string
    Key value from key_file that maps to this server.
    name string
    NTP server name.
    id str
    Field ID.
    key str
    Key value from key_file that maps to this server.
    name str
    NTP server name.
    id String
    Field ID.
    key String
    Key value from key_file that maps to this server.
    name String
    NTP server name.

    Package Details

    Repository
    powerscale dell/terraform-provider-powerscale
    License
    Notes
    This Pulumi package is based on the powerscale Terraform Provider.
    Viewing docs for powerscale 1.8.1
    published on Wednesday, Apr 1, 2026 by dell
      Try Pulumi Cloud free. Your team will thank you.