Documentation ¶
Index ¶
- Constants
- Variables
- func GET(client IAMClient, ctx context.Context, url string, expectedResponseCode int, ...) error
- type AccountPolicyServiceClient
- func (me *AccountPolicyServiceClient) CREATE(ctx context.Context, policy *Policy) (string, error)
- func (me *AccountPolicyServiceClient) DELETE(ctx context.Context, level PolicyLevel, levelID string, uuid string) error
- func (me *AccountPolicyServiceClient) GET(ctx context.Context, levelID string, uuid string) (*Policy, error)
- func (me *AccountPolicyServiceClient) LIST(ctx context.Context, level PolicyLevel, levelID string) ([]string, error)
- func (me *AccountPolicyServiceClient) List(ctx context.Context) ([]PolicyStub, error)
- func (me *AccountPolicyServiceClient) UPDATE(ctx context.Context, policy *Policy, uuid string) error
- type Authenticator
- type BasePolicyServiceClient
- func (me *BasePolicyServiceClient) AccountID() string
- func (me *BasePolicyServiceClient) CREATE(ctx context.Context, level PolicyLevel, levelID string, policy *Policy) (string, error)
- func (me *BasePolicyServiceClient) ClientID() string
- func (me *BasePolicyServiceClient) ClientSecret() string
- func (me *BasePolicyServiceClient) DELETE(ctx context.Context, level PolicyLevel, levelID string, uuid string) error
- func (me *BasePolicyServiceClient) EndpointURL() string
- func (me *BasePolicyServiceClient) GET(ctx context.Context, level PolicyLevel, levelID string, uuid string) (*Policy, error)
- func (me *BasePolicyServiceClient) LIST(ctx context.Context, level PolicyLevel, levelID string) ([]string, error)
- func (me *BasePolicyServiceClient) List(ctx context.Context, level PolicyLevel, levelID string) ([]PolicyStub, error)
- func (me *BasePolicyServiceClient) TokenURL() string
- func (me *BasePolicyServiceClient) UPDATE(ctx context.Context, level PolicyLevel, levelID string, policy *Policy, ...) error
- type EnvironmentPolicyServiceClient
- func (me *EnvironmentPolicyServiceClient) CREATE(ctx context.Context, policy *Policy) (string, error)
- func (me *EnvironmentPolicyServiceClient) DELETE(ctx context.Context, level PolicyLevel, levelID string, uuid string) error
- func (me *EnvironmentPolicyServiceClient) GET(ctx context.Context, levelID string, uuid string) (*Policy, error)
- func (me *EnvironmentPolicyServiceClient) LIST(ctx context.Context, level PolicyLevel, levelID string) ([]string, error)
- func (me *EnvironmentPolicyServiceClient) List(ctx context.Context) ([]PolicyStub, error)
- func (me *EnvironmentPolicyServiceClient) UPDATE(ctx context.Context, policy *Policy, uuid string) error
- type GlobalPolicyServiceClient
- func (me *GlobalPolicyServiceClient) DELETE(ctx context.Context, level PolicyLevel, levelID string, uuid string) error
- func (me *GlobalPolicyServiceClient) GET(ctx context.Context, levelID string, uuid string) (*Policy, error)
- func (me *GlobalPolicyServiceClient) LIST(ctx context.Context, level PolicyLevel, levelID string) ([]string, error)
- func (me *GlobalPolicyServiceClient) List(ctx context.Context) ([]PolicyStub, error)
- type IAMClient
- type IAMError
- type ListPoliciesResponse
- type Policy
- type PolicyLevel
- type PolicyStub
- type RateLimiter
Constants ¶
View Source
const DEFAULT_RATE_LIMITER_RATE = int64(1000)
View Source
const MAX_RATE_LIMITER_RATE = int64(5000)
Variables ¶
View Source
var DISABLE_RATE_LIMITER = (os.Getenv("DYNATRACE_DISABLE_IAM_RATE_LIMITER") == "true")
View Source
var PolicyLevels = struct { Global PolicyLevel Account PolicyLevel Environment PolicyLevel }{ PolicyLevel("global"), PolicyLevel("account"), PolicyLevel("environment"), }
Functions ¶
Types ¶
type AccountPolicyServiceClient ¶
type AccountPolicyServiceClient struct {
PolicyClient *BasePolicyServiceClient
}
func NewAccountPolicyService ¶
func (*AccountPolicyServiceClient) DELETE ¶
func (me *AccountPolicyServiceClient) DELETE(ctx context.Context, level PolicyLevel, levelID string, uuid string) error
func (*AccountPolicyServiceClient) LIST ¶
func (me *AccountPolicyServiceClient) LIST(ctx context.Context, level PolicyLevel, levelID string) ([]string, error)
func (*AccountPolicyServiceClient) List ¶
func (me *AccountPolicyServiceClient) List(ctx context.Context) ([]PolicyStub, error)
type Authenticator ¶
type BasePolicyServiceClient ¶
type BasePolicyServiceClient struct {
// contains filtered or unexported fields
}
func NewBasePolicyService ¶
func (*BasePolicyServiceClient) AccountID ¶
func (me *BasePolicyServiceClient) AccountID() string
func (*BasePolicyServiceClient) CREATE ¶
func (me *BasePolicyServiceClient) CREATE(ctx context.Context, level PolicyLevel, levelID string, policy *Policy) (string, error)
func (*BasePolicyServiceClient) ClientID ¶
func (me *BasePolicyServiceClient) ClientID() string
func (*BasePolicyServiceClient) ClientSecret ¶
func (me *BasePolicyServiceClient) ClientSecret() string
func (*BasePolicyServiceClient) DELETE ¶
func (me *BasePolicyServiceClient) DELETE(ctx context.Context, level PolicyLevel, levelID string, uuid string) error
func (*BasePolicyServiceClient) EndpointURL ¶ added in v1.67.0
func (me *BasePolicyServiceClient) EndpointURL() string
func (*BasePolicyServiceClient) GET ¶
func (me *BasePolicyServiceClient) GET(ctx context.Context, level PolicyLevel, levelID string, uuid string) (*Policy, error)
func (*BasePolicyServiceClient) LIST ¶
func (me *BasePolicyServiceClient) LIST(ctx context.Context, level PolicyLevel, levelID string) ([]string, error)
func (*BasePolicyServiceClient) List ¶
func (me *BasePolicyServiceClient) List(ctx context.Context, level PolicyLevel, levelID string) ([]PolicyStub, error)
func (*BasePolicyServiceClient) TokenURL ¶ added in v1.67.0
func (me *BasePolicyServiceClient) TokenURL() string
func (*BasePolicyServiceClient) UPDATE ¶
func (me *BasePolicyServiceClient) UPDATE(ctx context.Context, level PolicyLevel, levelID string, policy *Policy, uuid string) error
type EnvironmentPolicyServiceClient ¶
type EnvironmentPolicyServiceClient struct {
PolicyClient *BasePolicyServiceClient
}
func (*EnvironmentPolicyServiceClient) DELETE ¶
func (me *EnvironmentPolicyServiceClient) DELETE(ctx context.Context, level PolicyLevel, levelID string, uuid string) error
func (*EnvironmentPolicyServiceClient) LIST ¶
func (me *EnvironmentPolicyServiceClient) LIST(ctx context.Context, level PolicyLevel, levelID string) ([]string, error)
func (*EnvironmentPolicyServiceClient) List ¶
func (me *EnvironmentPolicyServiceClient) List(ctx context.Context) ([]PolicyStub, error)
type GlobalPolicyServiceClient ¶
type GlobalPolicyServiceClient struct {
PolicyClient *BasePolicyServiceClient
}
func NewGlobalPolicyService ¶
func (*GlobalPolicyServiceClient) DELETE ¶
func (me *GlobalPolicyServiceClient) DELETE(ctx context.Context, level PolicyLevel, levelID string, uuid string) error
func (*GlobalPolicyServiceClient) LIST ¶
func (me *GlobalPolicyServiceClient) LIST(ctx context.Context, level PolicyLevel, levelID string) ([]string, error)
func (*GlobalPolicyServiceClient) List ¶
func (me *GlobalPolicyServiceClient) List(ctx context.Context) ([]PolicyStub, error)
type IAMClient ¶
type IAMClient interface { POST(ctx context.Context, url string, payload any, expectedResponseCode int, forceNewBearer bool) ([]byte, error) PUT(ctx context.Context, url string, payload any, expectedResponseCode int, forceNewBearer bool) ([]byte, error) GET(ctx context.Context, url string, expectedResponseCode int, forceNewBearer bool) ([]byte, error) DELETE(ctx context.Context, url string, expectedResponseCode int, forceNewBearer bool) ([]byte, error) DELETE_MULTI_RESPONSE(ctx context.Context, url string, expectedResponseCodes []int, forceNewBearer bool) ([]byte, error) }
func NewIAMClient ¶
func NewIAMClient(auth Authenticator) IAMClient
type IAMError ¶
type ListPoliciesResponse ¶
type ListPoliciesResponse struct {
Items []PolicyStub `json:"policies"`
}
type Policy ¶
type Policy struct { // UUID string `json:"uuid,omitempty"` Name string `json:"name"` Tags []string `json:"tags,omitempty"` Description string `json:"description,omitempty"` StatementQuery string `json:"statementQuery"` }
func (*Policy) MarshalHCL ¶
func (me *Policy) MarshalHCL(properties hcl.Properties) error
type PolicyLevel ¶
type PolicyLevel string
type PolicyStub ¶
type RateLimiter ¶ added in v1.57.0
type RateLimiter struct {
// contains filtered or unexported fields
}
func NewRateLimiter ¶ added in v1.57.0
func NewRateLimiter() *RateLimiter
func (*RateLimiter) CanCall ¶ added in v1.57.0
func (rl *RateLimiter) CanCall() bool
Source Files ¶
Click to show internal directories.
Click to hide internal directories.