Documentation
¶
Index ¶
- Constants
- Variables
- func AccountIDFromRoleArn(roleArn string) (string, error)
- func CredentialsFromInstallation(ctx core.IntegrationContext) (*aws.Credentials, error)
- func IsAlreadyExistsErr(err error) bool
- func IsNotFoundErr(err error) bool
- func RegionFromInstallation(ctx core.IntegrationContext) string
- func TagsForAPI(tags []Tag) []any
- type APIDestinationMetadata
- type Error
- type EventBridgeEvent
- type EventBridgeMetadata
- type EventBridgeRuleMetadata
- type FloatTime
- type IAMMetadata
- type IAMRoleMetadata
- type IntegrationMetadata
- type ProvisionRuleParameters
- type SNSWebhookConfiguration
- type SNSWebhookMetadata
- type SessionMetadata
- type Tag
- type WebhookConfiguration
Constants ¶
View Source
const (
WebhookTypeSNS = "sns"
)
Variables ¶
View Source
var AllRegions = []configuration.FieldOption{
{
Label: "us-east-1",
Value: "us-east-1",
},
{
Label: "us-east-2",
Value: "us-east-2",
},
{
Label: "us-west-1",
Value: "us-west-1",
},
{
Label: "us-west-2",
Value: "us-west-2",
},
{
Label: "eu-west-1",
Value: "eu-west-1",
},
{
Label: "eu-central-1",
Value: "eu-central-1",
},
{
Label: "ap-northeast-1",
Value: "ap-northeast-1",
},
{
Label: "ap-northeast-2",
Value: "ap-northeast-2",
},
{
Label: "ap-southeast-1",
Value: "ap-southeast-1",
},
{
Label: "ap-southeast-2",
Value: "ap-southeast-2",
},
{
Label: "ap-south-1",
Value: "ap-south-1",
},
{
Label: "ca-central-1",
Value: "ca-central-1",
},
{
Label: "cn-north-1",
Value: "cn-north-1",
},
{
Label: "cn-northwest-1",
Value: "cn-northwest-1",
},
{
Label: "eu-north-1",
Value: "eu-north-1",
},
{
Label: "eu-south-1",
Value: "eu-south-1",
},
{
Label: "eu-west-2",
Value: "eu-west-2",
},
{
Label: "eu-west-3",
Value: "eu-west-3",
},
{
Label: "sa-east-1",
Value: "sa-east-1",
},
}
Functions ¶
func AccountIDFromRoleArn ¶ added in v0.7.0
* Extract the account ID from an IAM role ARN. * * Expected format: arn:aws:iam::<account-id>:role/<role-name>
func CredentialsFromInstallation ¶
func CredentialsFromInstallation(ctx core.IntegrationContext) (*aws.Credentials, error)
func IsAlreadyExistsErr ¶ added in v0.7.0
func IsNotFoundErr ¶ added in v0.7.0
func RegionFromInstallation ¶
func RegionFromInstallation(ctx core.IntegrationContext) string
func TagsForAPI ¶ added in v0.7.0
Types ¶
type APIDestinationMetadata ¶ added in v0.7.0
type Error ¶ added in v0.7.0
func ParseError ¶ added in v0.7.0
type EventBridgeEvent ¶ added in v0.7.0
type EventBridgeMetadata ¶ added in v0.7.0
type EventBridgeMetadata struct {
/*
* Since we need to support multiple regions,
* the integration needs to maintain one connection/destination per region.
*/
APIDestinations map[string]APIDestinationMetadata `json:"apiDestinations" mapstructure:"apiDestinations"`
/*
* List of EventBridge rules created by the integration.
* This ensures that we reuse the same rule for the same source, e.g., aws.codeartifact, aws.ecr, etc.
*/
Rules map[string]EventBridgeRuleMetadata `json:"rules" mapstructure:"rules"`
}
* EventBridge metadata for the integration.
type EventBridgeRuleMetadata ¶ added in v0.7.0
type EventBridgeRuleMetadata struct {
Source string `json:"source" mapstructure:"source"`
Region string `json:"region" mapstructure:"region"`
Name string `json:"name" mapstructure:"name"`
RuleArn string `json:"ruleArn" mapstructure:"ruleArn"`
DetailTypes []string `json:"detailTypes" mapstructure:"detailTypes"`
}
type FloatTime ¶ added in v0.7.0
FloatTime decodes AWS timestamps that are represented as float64 seconds since epoch. It marshals to RFC3339 strings for consistency across outputs.
func (FloatTime) MarshalJSON ¶ added in v0.7.0
func (*FloatTime) UnmarshalJSON ¶ added in v0.7.0
type IAMMetadata ¶ added in v0.7.0
type IAMMetadata struct {
/*
* The role ARN of the role that will be used to invoke the EventBridge API destinations.
*/
TargetDestinationRole *IAMRoleMetadata `json:"targetDestinationRole" mapstructure:"targetDestinationRole"`
}
* IAM metadata for the integration.
type IAMRoleMetadata ¶ added in v0.7.0
type IntegrationMetadata ¶ added in v0.7.0
type IntegrationMetadata struct {
Session *SessionMetadata `json:"session" mapstructure:"session"`
IAM *IAMMetadata `json:"iam" mapstructure:"iam"`
EventBridge *EventBridgeMetadata `json:"eventBridge" mapstructure:"eventBridge"`
Tags []Tag `json:"tags" mapstructure:"tags"`
}
type ProvisionRuleParameters ¶ added in v0.7.0
type SNSWebhookConfiguration ¶ added in v0.8.0
type SNSWebhookConfiguration struct {
TopicArn string `json:"topicArn"`
}
type SNSWebhookMetadata ¶ added in v0.8.0
type SNSWebhookMetadata struct {
SubscriptionArn string `json:"subscriptionArn"`
}
type SessionMetadata ¶ added in v0.7.0
type Tag ¶ added in v0.7.0
type Tag struct {
Key string `json:"key" mapstructure:"key"`
Value string `json:"value" mapstructure:"value"`
}
func NormalizeTags ¶ added in v0.7.0
type WebhookConfiguration ¶ added in v0.8.0
type WebhookConfiguration struct {
Region string `json:"region"`
Type string `json:"type"`
SNS *SNSWebhookConfiguration `json:"sns"`
}
Click to show internal directories.
Click to hide internal directories.