mirror of https://github.com/pulumi/pulumi.git
26 KiB
26 KiB
title: "Component" title_tag: "example.Component" meta_desc: "Documentation for the example.Component resource with examples, input properties, output properties, lookup functions, and supporting types." layout: api no_edit_this_page: true
Create Component Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Component(name: string, args?: ComponentArgs, opts?: CustomResourceOptions);
@overload
def Component(resource_name: str,
args: Optional[ComponentArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Component(resource_name: str,
opts: Optional[ResourceOptions] = None,
local_enum: Optional[local.MyEnum] = None,
remote_enum: Optional[pulumi_google_native.accesscontextmanager.v1.DevicePolicyAllowedDeviceManagementLevelsItem] = None)
func NewComponent(ctx *Context, name string, args *ComponentArgs, opts ...ResourceOption) (*Component, error)
public Component(string name, ComponentArgs? args = null, CustomResourceOptions? opts = null)
public Component(String name, ComponentArgs args)
public Component(String name, ComponentArgs args, CustomResourceOptions options)
type: example:Component
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 ComponentArgs
- 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 ComponentArgs
- 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 ComponentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ComponentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ComponentArgs
- 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 componentResource = new Example.Component("componentResource", new()
{
LocalEnum = Example.Local.MyEnum.Pi,
RemoteEnum = GoogleNative.Accesscontextmanager.V1.DevicePolicyAllowedDeviceManagementLevelsItem.ManagementUnspecified,
});
example, err := example.NewComponent(ctx, "componentResource", &example.ComponentArgs{
LocalEnum: local.MyEnumPi,
RemoteEnum: accesscontextmanager / v1.DevicePolicyAllowedDeviceManagementLevelsItemManagementUnspecified,
})
var componentResource = new Component("componentResource", ComponentArgs.builder()
.localEnum(3.1415)
.remoteEnum("MANAGEMENT_UNSPECIFIED")
.build());
component_resource = example.Component("componentResource",
local_enum=example.local.MyEnum.PI,
remote_enum=google_native.accesscontextmanager.v1.DevicePolicyAllowedDeviceManagementLevelsItem.MANAGEMENT_UNSPECIFIED)
const componentResource = new example.Component("componentResource", {
localEnum: example.local.MyEnum.Pi,
remoteEnum: google_native.accesscontextmanager.v1.DevicePolicyAllowedDeviceManagementLevelsItem.ManagementUnspecified,
});
type: example:Component
properties:
localEnum: 3.1415
remoteEnum: MANAGEMENT_UNSPECIFIED
Component 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 Component resource accepts the following input properties:
-
Local
Enum Pulumi.Example. Local. My Enum -
Remote
Enum Pulumi.Google Native. Accesscontextmanager. V1. Device Policy Allowed Device Management Levels Item - This type is defined in the Google Cloud Native package.
-
Local
Enum MyEnum -
Remote
Enum DevicePolicy Allowed Device Management Levels Item - This type is defined in the Google Cloud Native package.
-
local
Enum MyEnum -
remote
Enum DevicePolicy Allowed Device Management Levels Item - This type is defined in the Google Cloud Native package.
-
local
Enum localMy Enum -
remote
Enum pulumiGoogle Nativeaccesscontextmanagerv1Device Policy Allowed Device Management Levels Item - This type is defined in the Google Cloud Native package.
-
local_
enum local.My Enum -
remote_
enum pulumi_google_ native.accesscontextmanager.v1. Device Policy Allowed Device Management Levels Item - This type is defined in the Google Cloud Native package.
-
local
Enum 3.1415 | 1e-07 -
remote
Enum "MANAGEMENT_UNSPECIFIED" | "NONE" | "BASIC" | "COMPLETE" - This type is defined in the Google Cloud Native package.
Outputs
All input properties are implicitly available as output properties. Additionally, the Component 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.
Supporting Types
MyEnum, MyEnumArgs
- Pi
- 3.1415
- Small
- 1e-07
- My
Enum Pi - 3.1415
- My
Enum Small - 1e-07
- Pi
- 3.1415
- Small
- 1e-07
- Pi
- 3.1415
- Small
- 1e-07
- PI
- 3.1415
- SMALL
- 1e-07
- %!q(float64=3.1415)
- 3.1415
- %!q(float64=1e-07)
- 1e-07
Package Details
- Repository
- example
- License