1. Packages
  2. Volcengine
  3. API Docs
  4. cloud_monitor
  5. Contact
Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine

volcengine.cloud_monitor.Contact

Explore with Pulumi AI

Provides a resource to manage cloud monitor contact

Example Usage

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

const _default = new volcengine.cloud_monitor.Contact("default", {
    email: "192*****72@****.com",
    phone: "180****27812",
});
Copy
import pulumi
import pulumi_volcengine as volcengine

default = volcengine.cloud_monitor.Contact("default",
    email="192*****72@****.com",
    phone="180****27812")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/cloud_monitor"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloud_monitor.NewContact(ctx, "default", &cloud_monitor.ContactArgs{
			Email: pulumi.String("192*****72@****.com"),
			Phone: pulumi.String("180****27812"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;

return await Deployment.RunAsync(() => 
{
    var @default = new Volcengine.Cloud_monitor.Contact("default", new()
    {
        Email = "192*****72@****.com",
        Phone = "180****27812",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.cloud_monitor.Contact;
import com.pulumi.volcengine.cloud_monitor.ContactArgs;
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) {
        var default_ = new Contact("default", ContactArgs.builder()        
            .email("192*****72@****.com")
            .phone("180****27812")
            .build());

    }
}
Copy
resources:
  default:
    type: volcengine:cloud_monitor:Contact
    properties:
      email: 192*****72@****.com
      phone: 180****27812
Copy

Create Contact Resource

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

Constructor syntax

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

@overload
def Contact(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            email: Optional[str] = None,
            name: Optional[str] = None,
            phone: Optional[str] = None)
func NewContact(ctx *Context, name string, args ContactArgs, opts ...ResourceOption) (*Contact, error)
public Contact(string name, ContactArgs args, CustomResourceOptions? opts = null)
public Contact(String name, ContactArgs args)
public Contact(String name, ContactArgs args, CustomResourceOptions options)
type: volcengine:cloud_monitor:Contact
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. ContactArgs
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. ContactArgs
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. ContactArgs
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. ContactArgs
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. ContactArgs
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 contactResource = new Volcengine.Cloud_monitor.Contact("contactResource", new()
{
    Email = "string",
    Name = "string",
    Phone = "string",
});
Copy
example, err := cloud_monitor.NewContact(ctx, "contactResource", &cloud_monitor.ContactArgs{
	Email: pulumi.String("string"),
	Name:  pulumi.String("string"),
	Phone: pulumi.String("string"),
})
Copy
var contactResource = new Contact("contactResource", ContactArgs.builder()
    .email("string")
    .name("string")
    .phone("string")
    .build());
Copy
contact_resource = volcengine.cloud_monitor.Contact("contactResource",
    email="string",
    name="string",
    phone="string")
Copy
const contactResource = new volcengine.cloud_monitor.Contact("contactResource", {
    email: "string",
    name: "string",
    phone: "string",
});
Copy
type: volcengine:cloud_monitor:Contact
properties:
    email: string
    name: string
    phone: string
Copy

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

Email This property is required. string
The email of contact.
Name string
The name of contact.
Phone string
The phone of contact.
Email This property is required. string
The email of contact.
Name string
The name of contact.
Phone string
The phone of contact.
email This property is required. String
The email of contact.
name String
The name of contact.
phone String
The phone of contact.
email This property is required. string
The email of contact.
name string
The name of contact.
phone string
The phone of contact.
email This property is required. str
The email of contact.
name str
The name of contact.
phone str
The phone of contact.
email This property is required. String
The email of contact.
name String
The name of contact.
phone String
The phone of contact.

Outputs

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

Get an existing Contact 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?: ContactState, opts?: CustomResourceOptions): Contact
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        email: Optional[str] = None,
        name: Optional[str] = None,
        phone: Optional[str] = None) -> Contact
func GetContact(ctx *Context, name string, id IDInput, state *ContactState, opts ...ResourceOption) (*Contact, error)
public static Contact Get(string name, Input<string> id, ContactState? state, CustomResourceOptions? opts = null)
public static Contact get(String name, Output<String> id, ContactState state, CustomResourceOptions options)
resources:  _:    type: volcengine:cloud_monitor:Contact    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:
Email string
The email of contact.
Name string
The name of contact.
Phone string
The phone of contact.
Email string
The email of contact.
Name string
The name of contact.
Phone string
The phone of contact.
email String
The email of contact.
name String
The name of contact.
phone String
The phone of contact.
email string
The email of contact.
name string
The name of contact.
phone string
The phone of contact.
email str
The email of contact.
name str
The name of contact.
phone str
The phone of contact.
email String
The email of contact.
name String
The name of contact.
phone String
The phone of contact.

Import

CloudMonitor Contact can be imported using the id, e.g.

$ pulumi import volcengine:cloud_monitor/contact:Contact default 145258255725730****
Copy

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

Package Details

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