Documentation ¶
Index ¶
- Variables
- type IAMPolicy
- type Release
- func (*Release) Descriptor() ([]byte, []int)deprecated
- func (x *Release) GetFuncArn() string
- func (x *Release) GetRegion() string
- func (x *Release) GetResourceState() *opaqueany.Any
- func (x *Release) GetUrl() string
- func (x *Release) GetVerArn() string
- func (*Release) ProtoMessage()
- func (x *Release) ProtoReflect() protoreflect.Message
- func (x *Release) Reset()
- func (x *Release) String() string
- func (r *Release) URL() string
- type Releaser
- func (r *Releaser) Config() (interface{}, error)
- func (r *Releaser) ConfigSet(config interface{}) error
- func (r *Releaser) Destroy(ctx context.Context, log hclog.Logger, release *Release, ui terminal.UI) error
- func (r *Releaser) DestroyFunc() interface{}
- func (r *Releaser) Documentation() (*docs.Documentation, error)
- func (r *Releaser) Release(ctx context.Context, log hclog.Logger, src *component.Source, ui terminal.UI, ...) (*Release, error)
- func (r *Releaser) ReleaseFunc() interface{}
- func (r *Releaser) Status(ctx context.Context, log hclog.Logger, release *Release, ui terminal.UI) (*sdk.StatusReport, error)
- func (r *Releaser) StatusFunc() interface{}
- type ReleaserConfig
- type ReleaserConfigCors
- type Resource
- type Resource_FunctionUrl
- func (*Resource_FunctionUrl) Descriptor() ([]byte, []int)deprecated
- func (x *Resource_FunctionUrl) GetUrl() string
- func (*Resource_FunctionUrl) ProtoMessage()
- func (x *Resource_FunctionUrl) ProtoReflect() protoreflect.Message
- func (x *Resource_FunctionUrl) Reset()
- func (x *Resource_FunctionUrl) String() string
Constants ¶
This section is empty.
Variables ¶
var ( // If auth_type is not set we'll default to "NONE", allowing public access to the function URL DefaultFunctionUrlAuthType = lambda.FunctionUrlAuthTypeNone // If principal is not set we'll allow any authenticated AWS user to invoke the function URL DefaultPrincipal = "*" )
var File_waypoint_builtin_aws_lambda_function_url_plugin_proto protoreflect.FileDescriptor
var Options = []sdk.Option{ sdk.WithComponents(&Releaser{}), }
Options are the SDK options to use for instantiation for the plugin.
Functions ¶
This section is empty.
Types ¶
type IAMPolicy ¶
type IAMPolicy struct { Version string `json:"Version"` ID string `json:"Id"` Statement []struct { Sid string `json:"Sid"` Effect string `json:"Effect"` // Principal can be either a string, like "*", or a struct // like { "AWS": "arn:aws:iam::123456789012:root" } Principal interface{} `json:"Principal"` Action string `json:"Action"` Resource string `json:"Resource"` Condition struct { StringEquals struct { LambdaFunctionURLAuthType string `json:"lambda:FunctionUrlAuthType"` } `json:"StringEquals"` } `json:"Condition"` } `json:"Statement"` }
Lambda GetPolicy() returns a JSON string of its IAM policy, so we need to unmarshal it into this struct in order to use it.
See https://github.com/aws/aws-sdk-go/issues/127 and https://github.com/aws/aws-sdk-go-v2/issues/225
type Release ¶
type Release struct { // The function's public url Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` // The AWS region the function is deployed in Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` // The ARN for the Lambda function itself. FuncArn string `protobuf:"bytes,3,opt,name=func_arn,json=funcArn,proto3" json:"func_arn,omitempty"` // The ARN for the version of the Lambda function this deployment uses. VerArn string `protobuf:"bytes,4,opt,name=ver_arn,json=verArn,proto3" json:"ver_arn,omitempty"` ResourceState *opaqueany.Any `protobuf:"bytes,5,opt,name=resource_state,json=resourceState,proto3" json:"resource_state,omitempty"` // contains filtered or unexported fields }
func (*Release) Descriptor
deprecated
func (*Release) GetFuncArn ¶
func (*Release) GetResourceState ¶
func (*Release) ProtoMessage ¶
func (*Release) ProtoMessage()
func (*Release) ProtoReflect ¶
func (x *Release) ProtoReflect() protoreflect.Message
type Releaser ¶
type Releaser struct {
// contains filtered or unexported fields
}
func (*Releaser) ConfigSet ¶
ConfigSet is called after a configuration has been decoded we can use this to validate the config
func (*Releaser) DestroyFunc ¶
func (r *Releaser) DestroyFunc() interface{}
DestroyFunc implements component.Destroyer
func (*Releaser) Documentation ¶
func (r *Releaser) Documentation() (*docs.Documentation, error)
func (*Releaser) ReleaseFunc ¶
func (r *Releaser) ReleaseFunc() interface{}
ReleaseFunc implements component.ReleaseManager
func (*Releaser) StatusFunc ¶
func (r *Releaser) StatusFunc() interface{}
StatusFunc implements component.Status
type ReleaserConfig ¶
type ReleaserConfig struct { // "AWS_IAM" or "NONE" AuthType string `hcl:"auth_type,optional"` // Only permitted if AuthType is "AWS_IAM" otherwise defaults to "*" Principal string `hcl:"principal,optional"` // Configuration options for function url CORS Cors *ReleaserConfigCors `hcl:"cors,block"` }
ReleaserConfig is the configuration structure for the Releaser.
type ReleaserConfigCors ¶ added in v0.11.0
type ReleaserConfigCors struct { // Whether to allow cookies or other credentials in requests to your function // URL. The default is false. AllowCredentials *bool `hcl:"allow_credentials,optional"` // The HTTP headers that origins can include in requests to your function URL. // For example: Date, Keep-Alive, X-Custom-Header. AllowHeaders []*string `hcl:"allow_headers,optional"` // The HTTP methods that are allowed when calling your function URL. For example: // GET, POST, DELETE, or the wildcard character (*). AllowMethods []*string `hcl:"allow_methods,optional"` // The origins that can access your function URL. You can list any number of // specific origins, separated by a comma. For example: https://www.example.com, // http://localhost:60905. // // Alternatively, you can grant access to all origins using the wildcard character // (*). AllowOrigins []*string `hcl:"allow_origins,optional"` // The HTTP headers in your function response that you want to expose to origins // that call your function URL. For example: Date, Keep-Alive, X-Custom-Header. ExposeHeaders []*string `hcl:"expose_headers,optional"` // The maximum amount of time, in seconds, that web browsers can cache results // of a preflight request. By default, this is set to 0, which means that the // browser doesn't cache results. MaxAge *int64 `hcl:"max_age,optional"` }
Based on the Cors type from the AWS SDK, but with our HCL mappings. https://pkg.go.dev/github.com/aws/aws-sdk-go/service/lambda#Cors
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
Resource contains the internal resource states.
func (*Resource) Descriptor
deprecated
func (*Resource) ProtoMessage ¶
func (*Resource) ProtoMessage()
func (*Resource) ProtoReflect ¶
func (x *Resource) ProtoReflect() protoreflect.Message
type Resource_FunctionUrl ¶
type Resource_FunctionUrl struct { Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` // contains filtered or unexported fields }
func (*Resource_FunctionUrl) Descriptor
deprecated
func (*Resource_FunctionUrl) Descriptor() ([]byte, []int)
Deprecated: Use Resource_FunctionUrl.ProtoReflect.Descriptor instead.
func (*Resource_FunctionUrl) GetUrl ¶
func (x *Resource_FunctionUrl) GetUrl() string
func (*Resource_FunctionUrl) ProtoMessage ¶
func (*Resource_FunctionUrl) ProtoMessage()
func (*Resource_FunctionUrl) ProtoReflect ¶
func (x *Resource_FunctionUrl) ProtoReflect() protoreflect.Message
func (*Resource_FunctionUrl) Reset ¶
func (x *Resource_FunctionUrl) Reset()
func (*Resource_FunctionUrl) String ¶
func (x *Resource_FunctionUrl) String() string