Scaleway v1.27.0 published on Monday, Apr 21, 2025 by pulumiverse
scaleway.hosting.getHosting
Explore with Pulumi AI
Gets information about a webhosting.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";
// Get info by offer domain
const byDomain = scaleway.hosting.getHosting({
    domain: "foobar.com",
});
// Get info by id
const byId = scaleway.hosting.getHosting({
    webhostingId: "11111111-1111-1111-1111-111111111111",
});
import pulumi
import pulumi_scaleway as scaleway
# Get info by offer domain
by_domain = scaleway.hosting.get_hosting(domain="foobar.com")
# Get info by id
by_id = scaleway.hosting.get_hosting(webhosting_id="11111111-1111-1111-1111-111111111111")
package main
import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/hosting"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Get info by offer domain
		_, err := hosting.LookupHosting(ctx, &hosting.LookupHostingArgs{
			Domain: pulumi.StringRef("foobar.com"),
		}, nil)
		if err != nil {
			return err
		}
		// Get info by id
		_, err = hosting.LookupHosting(ctx, &hosting.LookupHostingArgs{
			WebhostingId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;
return await Deployment.RunAsync(() => 
{
    // Get info by offer domain
    var byDomain = Scaleway.Hosting.GetHosting.Invoke(new()
    {
        Domain = "foobar.com",
    });
    // Get info by id
    var byId = Scaleway.Hosting.GetHosting.Invoke(new()
    {
        WebhostingId = "11111111-1111-1111-1111-111111111111",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.hosting.HostingFunctions;
import com.pulumi.scaleway.hosting.inputs.GetHostingArgs;
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) {
        // Get info by offer domain
        final var byDomain = HostingFunctions.getHosting(GetHostingArgs.builder()
            .domain("foobar.com")
            .build());
        // Get info by id
        final var byId = HostingFunctions.getHosting(GetHostingArgs.builder()
            .webhostingId("11111111-1111-1111-1111-111111111111")
            .build());
    }
}
variables:
  # Get info by offer domain
  byDomain:
    fn::invoke:
      function: scaleway:hosting:getHosting
      arguments:
        domain: foobar.com
  # Get info by id
  byId:
    fn::invoke:
      function: scaleway:hosting:getHosting
      arguments:
        webhostingId: 11111111-1111-1111-1111-111111111111
Using getHosting
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 getHosting(args: GetHostingArgs, opts?: InvokeOptions): Promise<GetHostingResult>
function getHostingOutput(args: GetHostingOutputArgs, opts?: InvokeOptions): Output<GetHostingResult>def get_hosting(domain: Optional[str] = None,
                organization_id: Optional[str] = None,
                project_id: Optional[str] = None,
                webhosting_id: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetHostingResult
def get_hosting_output(domain: Optional[pulumi.Input[str]] = None,
                organization_id: Optional[pulumi.Input[str]] = None,
                project_id: Optional[pulumi.Input[str]] = None,
                webhosting_id: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetHostingResult]func LookupHosting(ctx *Context, args *LookupHostingArgs, opts ...InvokeOption) (*LookupHostingResult, error)
func LookupHostingOutput(ctx *Context, args *LookupHostingOutputArgs, opts ...InvokeOption) LookupHostingResultOutput> Note: This function is named LookupHosting in the Go SDK.
public static class GetHosting 
{
    public static Task<GetHostingResult> InvokeAsync(GetHostingArgs args, InvokeOptions? opts = null)
    public static Output<GetHostingResult> Invoke(GetHostingInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetHostingResult> getHosting(GetHostingArgs args, InvokeOptions options)
public static Output<GetHostingResult> getHosting(GetHostingArgs args, InvokeOptions options)
fn::invoke:
  function: scaleway:hosting/getHosting:getHosting
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Domain string
 - The hosting domain name. Only one of 
domainandwebhosting_idshould be specified. - Organization
Id string - The ID of the organization the hosting is associated with.
 - Project
Id string project_id) The ID of the project the hosting is associated with.- Webhosting
Id string - The hosting id. Only one of 
domainandwebhosting_idshould be specified. 
- Domain string
 - The hosting domain name. Only one of 
domainandwebhosting_idshould be specified. - Organization
Id string - The ID of the organization the hosting is associated with.
 - Project
Id string project_id) The ID of the project the hosting is associated with.- Webhosting
Id string - The hosting id. Only one of 
domainandwebhosting_idshould be specified. 
- domain String
 - The hosting domain name. Only one of 
domainandwebhosting_idshould be specified. - organization
Id String - The ID of the organization the hosting is associated with.
 - project
Id String project_id) The ID of the project the hosting is associated with.- webhosting
Id String - The hosting id. Only one of 
domainandwebhosting_idshould be specified. 
- domain string
 - The hosting domain name. Only one of 
domainandwebhosting_idshould be specified. - organization
Id string - The ID of the organization the hosting is associated with.
 - project
Id string project_id) The ID of the project the hosting is associated with.- webhosting
Id string - The hosting id. Only one of 
domainandwebhosting_idshould be specified. 
- domain str
 - The hosting domain name. Only one of 
domainandwebhosting_idshould be specified. - organization_
id str - The ID of the organization the hosting is associated with.
 - project_
id str project_id) The ID of the project the hosting is associated with.- webhosting_
id str - The hosting id. Only one of 
domainandwebhosting_idshould be specified. 
- domain String
 - The hosting domain name. Only one of 
domainandwebhosting_idshould be specified. - organization
Id String - The ID of the organization the hosting is associated with.
 - project
Id String project_id) The ID of the project the hosting is associated with.- webhosting
Id String - The hosting id. Only one of 
domainandwebhosting_idshould be specified. 
getHosting Result
The following output properties are available:
- Cpanel
Urls List<Pulumiverse.Scaleway. Hosting. Outputs. Get Hosting Cpanel Url>  - Created
At string - Dns
Status string - Email string
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Name
Servers List<Pulumiverse.Scaleway. Hosting. Outputs. Get Hosting Name Server>  - Offer
Id string - Offer
Name string - Option
Ids List<string> - Options
List<Pulumiverse.
Scaleway. Hosting. Outputs. Get Hosting Option>  - Organization
Id string - Platform
Hostname string - Platform
Number int - Records
List<Pulumiverse.
Scaleway. Hosting. Outputs. Get Hosting Record>  - Region string
 - Status string
 - List<string>
 - Updated
At string - Username string
 - Domain string
 - Project
Id string - Webhosting
Id string 
- Cpanel
Urls []GetHosting Cpanel Url  - Created
At string - Dns
Status string - Email string
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Name
Servers []GetHosting Name Server  - Offer
Id string - Offer
Name string - Option
Ids []string - Options
[]Get
Hosting Option  - Organization
Id string - Platform
Hostname string - Platform
Number int - Records
[]Get
Hosting Record  - Region string
 - Status string
 - []string
 - Updated
At string - Username string
 - Domain string
 - Project
Id string - Webhosting
Id string 
- cpanel
Urls List<GetHosting Cpanel Url>  - created
At String - dns
Status String - email String
 - id String
 - The provider-assigned unique ID for this managed resource.
 - name
Servers List<GetHosting Name Server>  - offer
Id String - offer
Name String - option
Ids List<String> - options
List<Get
Hosting Option>  - organization
Id String - platform
Hostname String - platform
Number Integer - records
List<Get
Hosting Record>  - region String
 - status String
 - List<String>
 - updated
At String - username String
 - domain String
 - project
Id String - webhosting
Id String 
- cpanel
Urls GetHosting Cpanel Url[]  - created
At string - dns
Status string - email string
 - id string
 - The provider-assigned unique ID for this managed resource.
 - name
Servers GetHosting Name Server[]  - offer
Id string - offer
Name string - option
Ids string[] - options
Get
Hosting Option[]  - organization
Id string - platform
Hostname string - platform
Number number - records
Get
Hosting Record[]  - region string
 - status string
 - string[]
 - updated
At string - username string
 - domain string
 - project
Id string - webhosting
Id string 
- cpanel_
urls Sequence[GetHosting Cpanel Url]  - created_
at str - dns_
status str - email str
 - id str
 - The provider-assigned unique ID for this managed resource.
 - name_
servers Sequence[GetHosting Name Server]  - offer_
id str - offer_
name str - option_
ids Sequence[str] - options
Sequence[Get
Hosting Option]  - organization_
id str - platform_
hostname str - platform_
number int - records
Sequence[Get
Hosting Record]  - region str
 - status str
 - Sequence[str]
 - updated_
at str - username str
 - domain str
 - project_
id str - webhosting_
id str 
- cpanel
Urls List<Property Map> - created
At String - dns
Status String - email String
 - id String
 - The provider-assigned unique ID for this managed resource.
 - name
Servers List<Property Map> - offer
Id String - offer
Name String - option
Ids List<String> - options List<Property Map>
 - organization
Id String - platform
Hostname String - platform
Number Number - records List<Property Map>
 - region String
 - status String
 - List<String>
 - updated
At String - username String
 - domain String
 - project
Id String - webhosting
Id String 
Supporting Types
GetHostingCpanelUrl   
GetHostingNameServer   
- hostname str
 - is_
default bool - status str
 
GetHostingOption  
GetHostingRecord  
Package Details
- Repository
 - scaleway pulumiverse/pulumi-scaleway
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
scalewayTerraform Provider.