awsconnection

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package awsconnection implements CRUD operations for the Settings 2.0 schema builtin:hyperscaler-authentication.connections.aws (AWS authentication for Dynatrace data acquisition extensions, e.g. com.dynatrace.extension.da-aws).

Index

Constants

View Source
const (
	SchemaID    = "builtin:hyperscaler-authentication.connections.aws"
	SettingsAPI = "/platform/classic/environment-api/v2/settings/objects"

	// TypeRoleBased is the only auth type currently supported by dtctl.
	TypeRoleBased = "awsRoleBasedAuthentication"

	// DefaultConsumer matches the schema default for awsRoleBasedAuthentication.
	DefaultConsumer = "SVC:com.dynatrace.da"
)

Variables

This section is empty.

Functions

func DynatraceAWSAccountID

func DynatraceAWSAccountID(baseURL string) string

DynatraceAWSAccountID returns the Dynatrace AWS account that should appear as the Principal in the IAM role trust policy for the given tenant base URL. The selection mirrors the cProductionEnvironment CloudFormation condition in da-aws-nested-monitoring-role.yaml (host segment[2] == "dynatrace").

func ValidateRoleArn

func ValidateRoleArn(arn string) error

ValidateRoleArn returns nil if arn matches the schema pattern (or is empty).

Types

type AWSConnection

type AWSConnection struct {
	ObjectID      string `json:"objectId" table:"ID"`
	SchemaID      string `json:"schemaId,omitempty" table:"SCHEMA,wide"`
	SchemaVersion string `json:"schemaVersion,omitempty" table:"VERSION,wide"`
	Scope         string `json:"scope,omitempty" table:"-"`
	Author        string `json:"author,omitempty" table:"AUTHOR,wide"`
	Created       int64  `json:"created,omitempty" table:"-"`
	Modified      int64  `json:"modified,omitempty" table:"-"`
	Summary       string `json:"summary,omitempty" table:"SUMMARY,wide"`
	Value         Value  `json:"value" table:"-"`

	// Flattened fields for table view.
	Name    string `json:"name,omitempty" table:"NAME"`
	Type    string `json:"type,omitempty" table:"TYPE"`
	RoleArn string `json:"roleArn,omitempty" table:"ROLE_ARN"`
}

type AWSConnectionCreate

type AWSConnectionCreate struct {
	SchemaID      string `json:"schemaId"`
	Scope         string `json:"scope"`
	Value         Value  `json:"value"`
	SchemaVersion string `json:"schemaVersion,omitempty"`
	ExternalID    string `json:"externalId,omitempty"`
}

type AwsRoleBasedAuthenticationConfig

type AwsRoleBasedAuthenticationConfig struct {
	RoleArn   string   `json:"roleArn"`
	Consumers []string `json:"consumers"`
}

type CreateResponse

type CreateResponse struct {
	ObjectID string `json:"objectId"`
	Code     int    `json:"code,omitempty"`
	Error    *struct {
		Code    int    `json:"code"`
		Message string `json:"message"`
	} `json:"error,omitempty"`
}

type Handler

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

func NewHandler

func NewHandler(c *client.Client) *Handler

func (*Handler) Create

func (h *Handler) Create(req AWSConnectionCreate) (*AWSConnection, error)

func (*Handler) Delete

func (h *Handler) Delete(id string) error

func (*Handler) FindByName

func (h *Handler) FindByName(name string) (*AWSConnection, error)

func (*Handler) Get

func (h *Handler) Get(id string) (*AWSConnection, error)

func (*Handler) List

func (h *Handler) List() ([]AWSConnection, error)

func (*Handler) Update

func (h *Handler) Update(objectID string, value Value) (*AWSConnection, error)

type ListResponse

type ListResponse struct {
	Items       []AWSConnection `json:"items"`
	TotalCount  int             `json:"totalCount"`
	NextPageKey string          `json:"nextPageKey,omitempty"`
}

type Value

type Value struct {
	Name                       string                            `json:"name"`
	Type                       string                            `json:"type"`
	AwsRoleBasedAuthentication *AwsRoleBasedAuthenticationConfig `json:"awsRoleBasedAuthentication,omitempty"`
}

Jump to

Keyboard shortcuts

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