essentialcontacts

package
v5.26.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contact

type Contact struct {
	pulumi.CustomResourceState

	// The email address to send notifications to. This does not need to be a Google account.
	Email pulumi.StringOutput `pulumi:"email"`
	// The preferred language for notifications, as a ISO 639-1 language code. See Supported languages for a list of supported languages.
	LanguageTag pulumi.StringOutput `pulumi:"languageTag"`
	// The identifier for the contact. Format: {resourceType}/{resource_id}/contacts/{contact_id}
	Name pulumi.StringOutput `pulumi:"name"`
	// The categories of notifications that the contact will receive communications for.
	NotificationCategorySubscriptions pulumi.StringArrayOutput `pulumi:"notificationCategorySubscriptions"`
	// The resource to save this contact for. Format: organizations/{organization_id}, folders/{folder_id} or projects/{project_id}
	Parent pulumi.StringOutput `pulumi:"parent"`
}

A contact that will receive notifications from Google Cloud.

To get more information about Contact, see:

* [API documentation](https://cloud.google.com/resource-manager/docs/reference/essentialcontacts/rest/v1beta1/projects.contacts) * How-to Guides

> **Warning:** If you are using User ADCs (Application Default Credentials) with this resource, you must specify a `billingProject` and set `userProjectOverride` to true in the provider configuration. Otherwise the Essential Contacts API will return a 403 error. Your account must have the `serviceusage.services.use` permission on the `billingProject` you defined.

## Example Usage ### Essential Contact

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/essentialcontacts"
"github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/organizations"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		project, err := organizations.LookupProject(ctx, nil, nil)
		if err != nil {
			return err
		}
		_, err = essentialcontacts.NewContact(ctx, "contact", &essentialcontacts.ContactArgs{
			Parent:      pulumi.String(project.Id),
			Email:       pulumi.String("foo@bar.com"),
			LanguageTag: pulumi.String("en-GB"),
			NotificationCategorySubscriptions: pulumi.StringArray{
				pulumi.String("ALL"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Contact can be imported using any of these accepted formats

```sh

$ pulumi import gcp:essentialcontacts/contact:Contact default {{name}}

```

func GetContact

func GetContact(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ContactState, opts ...pulumi.ResourceOption) (*Contact, error)

GetContact gets an existing Contact resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewContact

func NewContact(ctx *pulumi.Context,
	name string, args *ContactArgs, opts ...pulumi.ResourceOption) (*Contact, error)

NewContact registers a new resource with the given unique name, arguments, and options.

func (*Contact) ElementType

func (*Contact) ElementType() reflect.Type

func (*Contact) ToContactOutput

func (i *Contact) ToContactOutput() ContactOutput

func (*Contact) ToContactOutputWithContext

func (i *Contact) ToContactOutputWithContext(ctx context.Context) ContactOutput

func (*Contact) ToContactPtrOutput

func (i *Contact) ToContactPtrOutput() ContactPtrOutput

func (*Contact) ToContactPtrOutputWithContext

func (i *Contact) ToContactPtrOutputWithContext(ctx context.Context) ContactPtrOutput

type ContactArgs

type ContactArgs struct {
	// The email address to send notifications to. This does not need to be a Google account.
	Email pulumi.StringInput
	// The preferred language for notifications, as a ISO 639-1 language code. See Supported languages for a list of supported languages.
	LanguageTag pulumi.StringInput
	// The categories of notifications that the contact will receive communications for.
	NotificationCategorySubscriptions pulumi.StringArrayInput
	// The resource to save this contact for. Format: organizations/{organization_id}, folders/{folder_id} or projects/{project_id}
	Parent pulumi.StringInput
}

The set of arguments for constructing a Contact resource.

func (ContactArgs) ElementType

func (ContactArgs) ElementType() reflect.Type

type ContactArray

type ContactArray []ContactInput

func (ContactArray) ElementType

func (ContactArray) ElementType() reflect.Type

func (ContactArray) ToContactArrayOutput

func (i ContactArray) ToContactArrayOutput() ContactArrayOutput

func (ContactArray) ToContactArrayOutputWithContext

func (i ContactArray) ToContactArrayOutputWithContext(ctx context.Context) ContactArrayOutput

type ContactArrayInput

type ContactArrayInput interface {
	pulumi.Input

	ToContactArrayOutput() ContactArrayOutput
	ToContactArrayOutputWithContext(context.Context) ContactArrayOutput
}

ContactArrayInput is an input type that accepts ContactArray and ContactArrayOutput values. You can construct a concrete instance of `ContactArrayInput` via:

ContactArray{ ContactArgs{...} }

type ContactArrayOutput

type ContactArrayOutput struct{ *pulumi.OutputState }

func (ContactArrayOutput) ElementType

func (ContactArrayOutput) ElementType() reflect.Type

func (ContactArrayOutput) Index

func (ContactArrayOutput) ToContactArrayOutput

func (o ContactArrayOutput) ToContactArrayOutput() ContactArrayOutput

func (ContactArrayOutput) ToContactArrayOutputWithContext

func (o ContactArrayOutput) ToContactArrayOutputWithContext(ctx context.Context) ContactArrayOutput

type ContactInput

type ContactInput interface {
	pulumi.Input

	ToContactOutput() ContactOutput
	ToContactOutputWithContext(ctx context.Context) ContactOutput
}

type ContactMap

type ContactMap map[string]ContactInput

func (ContactMap) ElementType

func (ContactMap) ElementType() reflect.Type

func (ContactMap) ToContactMapOutput

func (i ContactMap) ToContactMapOutput() ContactMapOutput

func (ContactMap) ToContactMapOutputWithContext

func (i ContactMap) ToContactMapOutputWithContext(ctx context.Context) ContactMapOutput

type ContactMapInput

type ContactMapInput interface {
	pulumi.Input

	ToContactMapOutput() ContactMapOutput
	ToContactMapOutputWithContext(context.Context) ContactMapOutput
}

ContactMapInput is an input type that accepts ContactMap and ContactMapOutput values. You can construct a concrete instance of `ContactMapInput` via:

ContactMap{ "key": ContactArgs{...} }

type ContactMapOutput

type ContactMapOutput struct{ *pulumi.OutputState }

func (ContactMapOutput) ElementType

func (ContactMapOutput) ElementType() reflect.Type

func (ContactMapOutput) MapIndex

func (ContactMapOutput) ToContactMapOutput

func (o ContactMapOutput) ToContactMapOutput() ContactMapOutput

func (ContactMapOutput) ToContactMapOutputWithContext

func (o ContactMapOutput) ToContactMapOutputWithContext(ctx context.Context) ContactMapOutput

type ContactOutput

type ContactOutput struct{ *pulumi.OutputState }

func (ContactOutput) ElementType

func (ContactOutput) ElementType() reflect.Type

func (ContactOutput) ToContactOutput

func (o ContactOutput) ToContactOutput() ContactOutput

func (ContactOutput) ToContactOutputWithContext

func (o ContactOutput) ToContactOutputWithContext(ctx context.Context) ContactOutput

func (ContactOutput) ToContactPtrOutput

func (o ContactOutput) ToContactPtrOutput() ContactPtrOutput

func (ContactOutput) ToContactPtrOutputWithContext

func (o ContactOutput) ToContactPtrOutputWithContext(ctx context.Context) ContactPtrOutput

type ContactPtrInput

type ContactPtrInput interface {
	pulumi.Input

	ToContactPtrOutput() ContactPtrOutput
	ToContactPtrOutputWithContext(ctx context.Context) ContactPtrOutput
}

type ContactPtrOutput

type ContactPtrOutput struct{ *pulumi.OutputState }

func (ContactPtrOutput) Elem added in v5.21.0

func (ContactPtrOutput) ElementType

func (ContactPtrOutput) ElementType() reflect.Type

func (ContactPtrOutput) ToContactPtrOutput

func (o ContactPtrOutput) ToContactPtrOutput() ContactPtrOutput

func (ContactPtrOutput) ToContactPtrOutputWithContext

func (o ContactPtrOutput) ToContactPtrOutputWithContext(ctx context.Context) ContactPtrOutput

type ContactState

type ContactState struct {
	// The email address to send notifications to. This does not need to be a Google account.
	Email pulumi.StringPtrInput
	// The preferred language for notifications, as a ISO 639-1 language code. See Supported languages for a list of supported languages.
	LanguageTag pulumi.StringPtrInput
	// The identifier for the contact. Format: {resourceType}/{resource_id}/contacts/{contact_id}
	Name pulumi.StringPtrInput
	// The categories of notifications that the contact will receive communications for.
	NotificationCategorySubscriptions pulumi.StringArrayInput
	// The resource to save this contact for. Format: organizations/{organization_id}, folders/{folder_id} or projects/{project_id}
	Parent pulumi.StringPtrInput
}

func (ContactState) ElementType

func (ContactState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL