pulumi/tests/testdata/codegen/resource-args-python-case-i.../docs/pet/_index.md

19 KiB


title: "Pet" title_tag: "example.Pet" meta_desc: "Documentation for the example.Pet resource with examples, input properties, output properties, lookup functions, and supporting types." layout: api no_edit_this_page: true

Create Pet Resource

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

Constructor syntax

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

@overload
def Pet(resource_name: str,
        opts: Optional[ResourceOptions] = None,
        name: Optional[str] = None)
func NewPet(ctx *Context, name string, args *PetArgs, opts ...ResourceOption) (*Pet, error)
public Pet(string name, PetArgs? args = null, CustomResourceOptions? opts = null)
public Pet(String name, PetArgs args)
public Pet(String name, PetArgs args, CustomResourceOptions options)
type: example:Pet
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name string
The unique name of the resource.
args PetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args PetInitArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args PetArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args PetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args PetArgs
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 petResource = new Example.Pet("petResource", new()
{
    Name = "string",
});
example, err := example.NewPet(ctx, "petResource", &example.PetArgs{
	Name: pulumi.String("string"),
})
var petResource = new Pet("petResource", PetArgs.builder()
    .name("string")
    .build());
pet_resource = example.Pet("petResource", name="string")
const petResource = new example.Pet("petResource", {name: "string"});
type: example:Pet
properties:
    name: string

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

Name string
Name string
name String
name string
name str
name String

Outputs

All input properties are implicitly available as output properties. Additionally, the Pet 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.

Package Details

Repository
example
License