logging

package
v0.0.0-...-7000f67 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Index

Constants

This section is empty.

Variables

View Source
var BillingAccountLoggingExclusionSchema = map[string]*schema.Schema{
	"billing_account": {
		Type:     schema.TypeString,
		Required: true,
		ForceNew: true,
	},
}
View Source
var FolderLoggingExclusionSchema = map[string]*schema.Schema{
	"folder": {
		Type:             schema.TypeString,
		Required:         true,
		ForceNew:         true,
		DiffSuppressFunc: tpgresource.OptionalPrefixSuppress("folders/"),
	},
}
View Source
var LoggingExclusionBaseSchema = map[string]*schema.Schema{
	"filter": {
		Type:        schema.TypeString,
		Required:    true,
		Description: `The filter to apply when excluding logs. Only log entries that match the filter are excluded.`,
	},
	"name": {
		Type:        schema.TypeString,
		Required:    true,
		ForceNew:    true,
		Description: `The name of the logging exclusion.`,
	},
	"description": {
		Type:        schema.TypeString,
		Optional:    true,
		Description: `A human-readable description.`,
	},
	"disabled": {
		Type:        schema.TypeBool,
		Optional:    true,
		Description: `Whether this exclusion rule should be disabled or not. This defaults to false.`,
	},
}
View Source
var LoggingSinkResourceTypes = []string{
	"billingAccounts",
	"folders",
	"organizations",
	"projects",
}

LoggingSinkResourceTypes contains all the possible Stackdriver Logging resource types. Used to parse ids safely.

View Source
var OrganizationLoggingExclusionSchema = map[string]*schema.Schema{
	"org_id": {
		Type:     schema.TypeString,
		Required: true,
		ForceNew: true,
	},
}
View Source
var ProjectLoggingExclusionSchema = map[string]*schema.Schema{
	"project": {
		Type:     schema.TypeString,
		Optional: true,
		Computed: true,
		ForceNew: true,
	},
}

Functions

func BillingAccountLoggingExclusionIdParseFunc

func BillingAccountLoggingExclusionIdParseFunc(d *schema.ResourceData, _ *transport_tpg.Config) error

func DataSourceGoogleLoggingProjectCmekSettings

func DataSourceGoogleLoggingProjectCmekSettings() *schema.Resource

func DataSourceGoogleLoggingSink

func DataSourceGoogleLoggingSink() *schema.Resource

func ExtractFieldByPattern

func ExtractFieldByPattern(fieldName, fieldValue, parentFieldValue, pattern string) (string, error)

ExtractFieldByPattern returns the value of a field extracted from a parent field according to the given regular expression pattern. An error is returned if the field already has a value different than the value extracted.

func FolderLoggingExclusionIdParseFunc

func FolderLoggingExclusionIdParseFunc(d *schema.ResourceData, _ *transport_tpg.Config) error

func LoggingOperationWaitTime

func LoggingOperationWaitTime(config *transport_tpg.Config, op map[string]interface{}, activity, userAgent string, timeout time.Duration) error

func LoggingOperationWaitTimeWithResponse

func LoggingOperationWaitTimeWithResponse(config *transport_tpg.Config, op map[string]interface{}, response *map[string]interface{}, activity, userAgent string, timeout time.Duration) error

nolint: deadcode,unused

func OrganizationLoggingExclusionIdParseFunc

func OrganizationLoggingExclusionIdParseFunc(d *schema.ResourceData, _ *transport_tpg.Config) error

func ProjectLoggingExclusionIdParseFunc

func ProjectLoggingExclusionIdParseFunc(d *schema.ResourceData, config *transport_tpg.Config) error

func ResourceLoggingBillingAccountBucketConfig

func ResourceLoggingBillingAccountBucketConfig() *schema.Resource

Create Logging Bucket config

func ResourceLoggingBillingAccountSink

func ResourceLoggingBillingAccountSink() *schema.Resource

func ResourceLoggingBucketConfig

func ResourceLoggingBucketConfig(parentType string, parentSpecificSchema map[string]*schema.Schema, iDFunc loggingBucketConfigIDFunc) *schema.Resource

ResourceLoggingBucketConfig creates a resource definition by merging a unique field (eg: folder) to a generic logging bucket config resource. In practice the only difference between these resources is the url location.

func ResourceLoggingExclusion

func ResourceLoggingExclusion(parentSpecificSchema map[string]*schema.Schema, newUpdaterFunc newResourceLoggingExclusionUpdaterFunc, resourceIdParser tpgiamresource.ResourceIdParserFunc) *schema.Resource

func ResourceLoggingFolderBucketConfig

func ResourceLoggingFolderBucketConfig() *schema.Resource

Create Logging Bucket config

func ResourceLoggingFolderSink

func ResourceLoggingFolderSink() *schema.Resource

func ResourceLoggingLinkedDataset

func ResourceLoggingLinkedDataset() *schema.Resource

func ResourceLoggingLogView

func ResourceLoggingLogView() *schema.Resource

func ResourceLoggingMetric

func ResourceLoggingMetric() *schema.Resource

func ResourceLoggingOrganizationBucketConfig

func ResourceLoggingOrganizationBucketConfig() *schema.Resource

Create Logging Bucket config

func ResourceLoggingOrganizationSink

func ResourceLoggingOrganizationSink() *schema.Resource

func ResourceLoggingProjectBucketConfig

func ResourceLoggingProjectBucketConfig() *schema.Resource

Create Logging Bucket config

func ResourceLoggingProjectSink

func ResourceLoggingProjectSink() *schema.Resource

Types

type BillingAccountLoggingExclusionUpdater

type BillingAccountLoggingExclusionUpdater struct {
	Config *transport_tpg.Config
	// contains filtered or unexported fields
}

func (*BillingAccountLoggingExclusionUpdater) CreateLoggingExclusion

func (u *BillingAccountLoggingExclusionUpdater) CreateLoggingExclusion(parent string, exclusion *logging.LogExclusion) error

func (*BillingAccountLoggingExclusionUpdater) DeleteLoggingExclusion

func (u *BillingAccountLoggingExclusionUpdater) DeleteLoggingExclusion(id string) error

func (*BillingAccountLoggingExclusionUpdater) DescribeResource

func (u *BillingAccountLoggingExclusionUpdater) DescribeResource() string

func (*BillingAccountLoggingExclusionUpdater) GetResourceId

func (u *BillingAccountLoggingExclusionUpdater) GetResourceId() string

func (*BillingAccountLoggingExclusionUpdater) GetResourceType

func (u *BillingAccountLoggingExclusionUpdater) GetResourceType() string

func (*BillingAccountLoggingExclusionUpdater) ReadLoggingExclusion

func (u *BillingAccountLoggingExclusionUpdater) ReadLoggingExclusion(id string) (*logging.LogExclusion, error)

func (*BillingAccountLoggingExclusionUpdater) UpdateLoggingExclusion

func (u *BillingAccountLoggingExclusionUpdater) UpdateLoggingExclusion(id string, exclusion *logging.LogExclusion, updateMask string) error

type FolderLoggingExclusionUpdater

type FolderLoggingExclusionUpdater struct {
	Config *transport_tpg.Config
	// contains filtered or unexported fields
}

func (*FolderLoggingExclusionUpdater) CreateLoggingExclusion

func (u *FolderLoggingExclusionUpdater) CreateLoggingExclusion(parent string, exclusion *logging.LogExclusion) error

func (*FolderLoggingExclusionUpdater) DeleteLoggingExclusion

func (u *FolderLoggingExclusionUpdater) DeleteLoggingExclusion(id string) error

func (*FolderLoggingExclusionUpdater) DescribeResource

func (u *FolderLoggingExclusionUpdater) DescribeResource() string

func (*FolderLoggingExclusionUpdater) GetResourceId

func (u *FolderLoggingExclusionUpdater) GetResourceId() string

func (*FolderLoggingExclusionUpdater) GetResourceType

func (u *FolderLoggingExclusionUpdater) GetResourceType() string

func (*FolderLoggingExclusionUpdater) ReadLoggingExclusion

func (u *FolderLoggingExclusionUpdater) ReadLoggingExclusion(id string) (*logging.LogExclusion, error)

func (*FolderLoggingExclusionUpdater) UpdateLoggingExclusion

func (u *FolderLoggingExclusionUpdater) UpdateLoggingExclusion(id string, exclusion *logging.LogExclusion, updateMask string) error

type LoggingExclusionId

type LoggingExclusionId struct {
	ResourceId string
	// contains filtered or unexported fields
}

LoggingExclusionId represents the parts that make up the canonical id used within terraform for a logging resource.

func ParseLoggingExclusionId

func ParseLoggingExclusionId(id string) (*LoggingExclusionId, error)

ParseLoggingExclusionId parses a canonical id into a LoggingExclusionId, or returns an error on failure.

type LoggingOperationWaiter

type LoggingOperationWaiter struct {
	Config    *transport_tpg.Config
	UserAgent string
	tpgresource.CommonOperationWaiter
}

func (*LoggingOperationWaiter) QueryOp

func (w *LoggingOperationWaiter) QueryOp() (interface{}, error)

type LoggingSinkId

type LoggingSinkId struct {
	// contains filtered or unexported fields
}

LoggingSinkId represents the parts that make up the canonical id used within terraform for a logging resource.

func ParseLoggingSinkId

func ParseLoggingSinkId(id string) (*LoggingSinkId, error)

ParseLoggingSinkId parses a canonical id into a LoggingSinkId, or returns an error on failure.

type OrganizationLoggingExclusionUpdater

type OrganizationLoggingExclusionUpdater struct {
	Config *transport_tpg.Config
	// contains filtered or unexported fields
}

func (*OrganizationLoggingExclusionUpdater) CreateLoggingExclusion

func (u *OrganizationLoggingExclusionUpdater) CreateLoggingExclusion(parent string, exclusion *logging.LogExclusion) error

func (*OrganizationLoggingExclusionUpdater) DeleteLoggingExclusion

func (u *OrganizationLoggingExclusionUpdater) DeleteLoggingExclusion(id string) error

func (*OrganizationLoggingExclusionUpdater) DescribeResource

func (u *OrganizationLoggingExclusionUpdater) DescribeResource() string

func (*OrganizationLoggingExclusionUpdater) GetResourceId

func (u *OrganizationLoggingExclusionUpdater) GetResourceId() string

func (*OrganizationLoggingExclusionUpdater) GetResourceType

func (u *OrganizationLoggingExclusionUpdater) GetResourceType() string

func (*OrganizationLoggingExclusionUpdater) ReadLoggingExclusion

func (u *OrganizationLoggingExclusionUpdater) ReadLoggingExclusion(id string) (*logging.LogExclusion, error)

func (*OrganizationLoggingExclusionUpdater) UpdateLoggingExclusion

func (u *OrganizationLoggingExclusionUpdater) UpdateLoggingExclusion(id string, exclusion *logging.LogExclusion, updateMask string) error

type ProjectLoggingExclusionUpdater

type ProjectLoggingExclusionUpdater struct {
	Config *transport_tpg.Config
	// contains filtered or unexported fields
}

func (*ProjectLoggingExclusionUpdater) CreateLoggingExclusion

func (u *ProjectLoggingExclusionUpdater) CreateLoggingExclusion(parent string, exclusion *logging.LogExclusion) error

func (*ProjectLoggingExclusionUpdater) DeleteLoggingExclusion

func (u *ProjectLoggingExclusionUpdater) DeleteLoggingExclusion(id string) error

func (*ProjectLoggingExclusionUpdater) DescribeResource

func (u *ProjectLoggingExclusionUpdater) DescribeResource() string

func (*ProjectLoggingExclusionUpdater) GetResourceId

func (u *ProjectLoggingExclusionUpdater) GetResourceId() string

func (*ProjectLoggingExclusionUpdater) GetResourceType

func (u *ProjectLoggingExclusionUpdater) GetResourceType() string

func (*ProjectLoggingExclusionUpdater) ReadLoggingExclusion

func (u *ProjectLoggingExclusionUpdater) ReadLoggingExclusion(id string) (*logging.LogExclusion, error)

func (*ProjectLoggingExclusionUpdater) UpdateLoggingExclusion

func (u *ProjectLoggingExclusionUpdater) UpdateLoggingExclusion(id string, exclusion *logging.LogExclusion, updateMask string) error

type ResourceLoggingExclusionUpdater

type ResourceLoggingExclusionUpdater interface {
	CreateLoggingExclusion(parent string, exclusion *logging.LogExclusion) error
	ReadLoggingExclusion(id string) (*logging.LogExclusion, error)
	UpdateLoggingExclusion(id string, exclusion *logging.LogExclusion, updateMask string) error
	DeleteLoggingExclusion(id string) error

	GetResourceType() string

	// Returns the unique resource identifier.
	GetResourceId() string

	// Textual description of this resource to be used in error message.
	// The description should include the unique resource identifier.
	DescribeResource() string
}

The ResourceLoggingExclusionUpdater interface is implemented for each GCP resource supporting log exclusions.

Implementations should keep track of the resource identifier.

Jump to

Keyboard shortcuts

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