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
- func DynatraceAWSAccountID(baseURL string) string
- func ValidateRoleArn(arn string) error
- type AWSConnection
- type AWSConnectionCreate
- type AwsRoleBasedAuthenticationConfig
- type CreateResponse
- type Handler
- func (h *Handler) Create(req AWSConnectionCreate) (*AWSConnection, error)
- func (h *Handler) Delete(id string) error
- func (h *Handler) FindByName(name string) (*AWSConnection, error)
- func (h *Handler) Get(id string) (*AWSConnection, error)
- func (h *Handler) List() ([]AWSConnection, error)
- func (h *Handler) Update(objectID string, value Value) (*AWSConnection, error)
- type ListResponse
- type Value
Constants ¶
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 ¶
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 ¶
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 CreateResponse ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) Create ¶
func (h *Handler) Create(req AWSConnectionCreate) (*AWSConnection, error)
func (*Handler) FindByName ¶
func (h *Handler) FindByName(name string) (*AWSConnection, error)
func (*Handler) List ¶
func (h *Handler) List() ([]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"`
}