github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/plain-schema-gh6957/nodejs/staticPage.ts (about)

     1  // *** WARNING: this file was generated by test. ***
     2  // *** Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  import * as pulumi from "@pulumi/pulumi";
     5  import * as inputs from "./types/input";
     6  import * as outputs from "./types/output";
     7  import * as utilities from "./utilities";
     8  
     9  import * as pulumiAws from "@pulumi/aws";
    10  
    11  export class StaticPage extends pulumi.ComponentResource {
    12      /** @internal */
    13      public static readonly __pulumiType = 'xyz:index:StaticPage';
    14  
    15      /**
    16       * Returns true if the given object is an instance of StaticPage.  This is designed to work even
    17       * when multiple copies of the Pulumi SDK have been loaded into the same process.
    18       */
    19      public static isInstance(obj: any): obj is StaticPage {
    20          if (obj === undefined || obj === null) {
    21              return false;
    22          }
    23          return obj['__pulumiType'] === StaticPage.__pulumiType;
    24      }
    25  
    26      /**
    27       * The bucket resource.
    28       */
    29      public /*out*/ readonly bucket!: pulumi.Output<pulumiAws.s3.Bucket>;
    30      /**
    31       * The website URL.
    32       */
    33      public /*out*/ readonly websiteUrl!: pulumi.Output<string>;
    34  
    35      /**
    36       * Create a StaticPage resource with the given unique name, arguments, and options.
    37       *
    38       * @param name The _unique_ name of the resource.
    39       * @param args The arguments to use to populate this resource's properties.
    40       * @param opts A bag of options that control this resource's behavior.
    41       */
    42      constructor(name: string, args: StaticPageArgs, opts?: pulumi.ComponentResourceOptions) {
    43          let resourceInputs: pulumi.Inputs = {};
    44          opts = opts || {};
    45          if (!opts.id) {
    46              if ((!args || args.indexContent === undefined) && !opts.urn) {
    47                  throw new Error("Missing required property 'indexContent'");
    48              }
    49              resourceInputs["foo"] = args ? args.foo : undefined;
    50              resourceInputs["indexContent"] = args ? args.indexContent : undefined;
    51              resourceInputs["bucket"] = undefined /*out*/;
    52              resourceInputs["websiteUrl"] = undefined /*out*/;
    53          } else {
    54              resourceInputs["bucket"] = undefined /*out*/;
    55              resourceInputs["websiteUrl"] = undefined /*out*/;
    56          }
    57          opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
    58          super(StaticPage.__pulumiType, name, resourceInputs, opts, true /*remote*/);
    59      }
    60  }
    61  
    62  /**
    63   * The set of arguments for constructing a StaticPage resource.
    64   */
    65  export interface StaticPageArgs {
    66      foo?: inputs.FooArgs;
    67      /**
    68       * The HTML content for index.html.
    69       */
    70      indexContent: pulumi.Input<string>;
    71  }