1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. esa
  5. Page
Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi

alicloud.esa.Page

Explore with Pulumi AI

Provides a ESA Page resource.

For information about ESA Page and how to use it, see What is Page.

NOTE: Available since v1.242.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = new alicloud.esa.Page("default", {
    description: "example resource html page",
    contentType: "text/html",
    content: "PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9InpoLUNOIj4KICA8aGVhZD4KICAgIDx0aXRsZT40MDMgRm9yYmlkZGVuPC90aXRsZT4KICA8L2hlYWQ+CiAgPGJvZHk+CiAgICA8aDE+NDAzIEZvcmJpZGRlbjwvaDE+CiAgPC9ib2R5Pgo8L2h0bWw+",
    pageName: "resource_example_html_page",
});
Copy
import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "terraform-example"
default = alicloud.esa.Page("default",
    description="example resource html page",
    content_type="text/html",
    content="PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9InpoLUNOIj4KICA8aGVhZD4KICAgIDx0aXRsZT40MDMgRm9yYmlkZGVuPC90aXRsZT4KICA8L2hlYWQ+CiAgPGJvZHk+CiAgICA8aDE+NDAzIEZvcmJpZGRlbjwvaDE+CiAgPC9ib2R5Pgo8L2h0bWw+",
    page_name="resource_example_html_page")
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/esa"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		name := "terraform-example"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		_, err := esa.NewPage(ctx, "default", &esa.PageArgs{
			Description: pulumi.String("example resource html page"),
			ContentType: pulumi.String("text/html"),
			Content:     pulumi.String("PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9InpoLUNOIj4KICA8aGVhZD4KICAgIDx0aXRsZT40MDMgRm9yYmlkZGVuPC90aXRsZT4KICA8L2hlYWQ+CiAgPGJvZHk+CiAgICA8aDE+NDAzIEZvcmJpZGRlbjwvaDE+CiAgPC9ib2R5Pgo8L2h0bWw+"),
			PageName:    pulumi.String("resource_example_html_page"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var name = config.Get("name") ?? "terraform-example";
    var @default = new AliCloud.Esa.Page("default", new()
    {
        Description = "example resource html page",
        ContentType = "text/html",
        Content = "PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9InpoLUNOIj4KICA8aGVhZD4KICAgIDx0aXRsZT40MDMgRm9yYmlkZGVuPC90aXRsZT4KICA8L2hlYWQ+CiAgPGJvZHk+CiAgICA8aDE+NDAzIEZvcmJpZGRlbjwvaDE+CiAgPC9ib2R5Pgo8L2h0bWw+",
        PageName = "resource_example_html_page",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.esa.Page;
import com.pulumi.alicloud.esa.PageArgs;
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 config = ctx.config();
        final var name = config.get("name").orElse("terraform-example");
        var default_ = new Page("default", PageArgs.builder()
            .description("example resource html page")
            .contentType("text/html")
            .content("PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9InpoLUNOIj4KICA8aGVhZD4KICAgIDx0aXRsZT40MDMgRm9yYmlkZGVuPC90aXRsZT4KICA8L2hlYWQ+CiAgPGJvZHk+CiAgICA8aDE+NDAzIEZvcmJpZGRlbjwvaDE+CiAgPC9ib2R5Pgo8L2h0bWw+")
            .pageName("resource_example_html_page")
            .build());

    }
}
Copy
configuration:
  name:
    type: string
    default: terraform-example
resources:
  default:
    type: alicloud:esa:Page
    properties:
      description: example resource html page
      contentType: text/html
      content: PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9InpoLUNOIj4KICA8aGVhZD4KICAgIDx0aXRsZT40MDMgRm9yYmlkZGVuPC90aXRsZT4KICA8L2hlYWQ+CiAgPGJvZHk+CiAgICA8aDE+NDAzIEZvcmJpZGRlbjwvaDE+CiAgPC9ib2R5Pgo8L2h0bWw+
      pageName: resource_example_html_page
Copy

Create Page Resource

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

Constructor syntax

new Page(name: string, args: PageArgs, opts?: CustomResourceOptions);
@overload
def Page(resource_name: str,
         args: PageArgs,
         opts: Optional[ResourceOptions] = None)

@overload
def Page(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         content_type: Optional[str] = None,
         page_name: Optional[str] = None,
         content: Optional[str] = None,
         description: Optional[str] = None)
func NewPage(ctx *Context, name string, args PageArgs, opts ...ResourceOption) (*Page, error)
public Page(string name, PageArgs args, CustomResourceOptions? opts = null)
public Page(String name, PageArgs args)
public Page(String name, PageArgs args, CustomResourceOptions options)
type: alicloud:esa:Page
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. PageArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. PageArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. PageArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. PageArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. PageArgs
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 pageResource = new AliCloud.Esa.Page("pageResource", new()
{
    ContentType = "string",
    PageName = "string",
    Content = "string",
    Description = "string",
});
Copy
example, err := esa.NewPage(ctx, "pageResource", &esa.PageArgs{
	ContentType: pulumi.String("string"),
	PageName:    pulumi.String("string"),
	Content:     pulumi.String("string"),
	Description: pulumi.String("string"),
})
Copy
var pageResource = new Page("pageResource", PageArgs.builder()
    .contentType("string")
    .pageName("string")
    .content("string")
    .description("string")
    .build());
Copy
page_resource = alicloud.esa.Page("pageResource",
    content_type="string",
    page_name="string",
    content="string",
    description="string")
Copy
const pageResource = new alicloud.esa.Page("pageResource", {
    contentType: "string",
    pageName: "string",
    content: "string",
    description: "string",
});
Copy
type: alicloud:esa:Page
properties:
    content: string
    contentType: string
    description: string
    pageName: string
Copy

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

ContentType This property is required. string
The description of the custom error page.
PageName This property is required. string
The ID of the custom error page, which can be obtained by calling the ListPages operation.
Content string
The Content-Type field in the HTTP header. Valid values:

  • text/html
  • application/json
Description string
The name of the custom error page.
ContentType This property is required. string
The description of the custom error page.
PageName This property is required. string
The ID of the custom error page, which can be obtained by calling the ListPages operation.
Content string
The Content-Type field in the HTTP header. Valid values:

  • text/html
  • application/json
Description string
The name of the custom error page.
contentType This property is required. String
The description of the custom error page.
pageName This property is required. String
The ID of the custom error page, which can be obtained by calling the ListPages operation.
content String
The Content-Type field in the HTTP header. Valid values:

  • text/html
  • application/json
description String
The name of the custom error page.
contentType This property is required. string
The description of the custom error page.
pageName This property is required. string
The ID of the custom error page, which can be obtained by calling the ListPages operation.
content string
The Content-Type field in the HTTP header. Valid values:

  • text/html
  • application/json
description string
The name of the custom error page.
content_type This property is required. str
The description of the custom error page.
page_name This property is required. str
The ID of the custom error page, which can be obtained by calling the ListPages operation.
content str
The Content-Type field in the HTTP header. Valid values:

  • text/html
  • application/json
description str
The name of the custom error page.
contentType This property is required. String
The description of the custom error page.
pageName This property is required. String
The ID of the custom error page, which can be obtained by calling the ListPages operation.
content String
The Content-Type field in the HTTP header. Valid values:

  • text/html
  • application/json
description String
The name of the custom error page.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing Page Resource

Get an existing Page 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?: PageState, opts?: CustomResourceOptions): Page
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        content: Optional[str] = None,
        content_type: Optional[str] = None,
        description: Optional[str] = None,
        page_name: Optional[str] = None) -> Page
func GetPage(ctx *Context, name string, id IDInput, state *PageState, opts ...ResourceOption) (*Page, error)
public static Page Get(string name, Input<string> id, PageState? state, CustomResourceOptions? opts = null)
public static Page get(String name, Output<String> id, PageState state, CustomResourceOptions options)
resources:  _:    type: alicloud:esa:Page    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
Content string
The Content-Type field in the HTTP header. Valid values:

  • text/html
  • application/json
ContentType string
The description of the custom error page.
Description string
The name of the custom error page.
PageName string
The ID of the custom error page, which can be obtained by calling the ListPages operation.
Content string
The Content-Type field in the HTTP header. Valid values:

  • text/html
  • application/json
ContentType string
The description of the custom error page.
Description string
The name of the custom error page.
PageName string
The ID of the custom error page, which can be obtained by calling the ListPages operation.
content String
The Content-Type field in the HTTP header. Valid values:

  • text/html
  • application/json
contentType String
The description of the custom error page.
description String
The name of the custom error page.
pageName String
The ID of the custom error page, which can be obtained by calling the ListPages operation.
content string
The Content-Type field in the HTTP header. Valid values:

  • text/html
  • application/json
contentType string
The description of the custom error page.
description string
The name of the custom error page.
pageName string
The ID of the custom error page, which can be obtained by calling the ListPages operation.
content str
The Content-Type field in the HTTP header. Valid values:

  • text/html
  • application/json
content_type str
The description of the custom error page.
description str
The name of the custom error page.
page_name str
The ID of the custom error page, which can be obtained by calling the ListPages operation.
content String
The Content-Type field in the HTTP header. Valid values:

  • text/html
  • application/json
contentType String
The description of the custom error page.
description String
The name of the custom error page.
pageName String
The ID of the custom error page, which can be obtained by calling the ListPages operation.

Import

ESA Page can be imported using the id, e.g.

$ pulumi import alicloud:esa/page:Page example <id>
Copy

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

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.