ec2mock

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEc2ServiceMockFactory

func CreateEc2ServiceMockFactory(
	opts ...ec2ServiceMockOption,
) func(awsConfig *aws.Config, providerContext provider.Context) ec2service.Service

func WithAllocateAddressError

func WithAllocateAddressError(err error) ec2ServiceMockOption

func WithAllocateAddressOutputs

func WithAllocateAddressOutputs(outputs []*ec2.AllocateAddressOutput) ec2ServiceMockOption

Elastic IP-related options.

func WithAssociateRouteTableError

func WithAssociateRouteTableError(err error) ec2ServiceMockOption

func WithAssociateRouteTableOutput

func WithAssociateRouteTableOutput(output *ec2.AssociateRouteTableOutput) ec2ServiceMockOption

func WithAttachInternetGatewayError

func WithAttachInternetGatewayError(err error) ec2ServiceMockOption

func WithAttachInternetGatewayOutput

func WithAttachInternetGatewayOutput(output *ec2.AttachInternetGatewayOutput) ec2ServiceMockOption

func WithAuthorizeSecurityGroupEgressError added in v0.2.0

func WithAuthorizeSecurityGroupEgressError(err error) ec2ServiceMockOption

func WithAuthorizeSecurityGroupEgressOutput added in v0.2.0

func WithAuthorizeSecurityGroupEgressOutput(output *ec2.AuthorizeSecurityGroupEgressOutput) ec2ServiceMockOption

func WithAuthorizeSecurityGroupIngressError

func WithAuthorizeSecurityGroupIngressError(err error) ec2ServiceMockOption

func WithAuthorizeSecurityGroupIngressOutput

func WithAuthorizeSecurityGroupIngressOutput(output *ec2.AuthorizeSecurityGroupIngressOutput) ec2ServiceMockOption

Security group ingress-related options.

func WithCreateEgressOnlyInternetGatewayError added in v0.5.0

func WithCreateEgressOnlyInternetGatewayError(err error) ec2ServiceMockOption

func WithCreateEgressOnlyInternetGatewayOutput added in v0.5.0

func WithCreateEgressOnlyInternetGatewayOutput(output *ec2.CreateEgressOnlyInternetGatewayOutput) ec2ServiceMockOption

Egress-only internet gateway-related options.

func WithCreateInternetGatewayError

func WithCreateInternetGatewayError(err error) ec2ServiceMockOption

func WithCreateInternetGatewayOutput

func WithCreateInternetGatewayOutput(output *ec2.CreateInternetGatewayOutput) ec2ServiceMockOption

Internet gateway-related options.

func WithCreateNatGatewayError

func WithCreateNatGatewayError(err error) ec2ServiceMockOption

func WithCreateNatGatewayOutputs

func WithCreateNatGatewayOutputs(outputs []*ec2.CreateNatGatewayOutput) ec2ServiceMockOption

NAT gateway-related options.

func WithCreateNetworkAclEntryError

func WithCreateNetworkAclEntryError(err error) ec2ServiceMockOption

func WithCreateNetworkAclEntryOutput

func WithCreateNetworkAclEntryOutput(output *ec2.CreateNetworkAclEntryOutput) ec2ServiceMockOption

func WithCreateNetworkAclError

func WithCreateNetworkAclError(err error) ec2ServiceMockOption

func WithCreateNetworkAclOutput

func WithCreateNetworkAclOutput(output *ec2.CreateNetworkAclOutput) ec2ServiceMockOption

Network ACL-related options.

func WithCreateRouteError

func WithCreateRouteError(err error) ec2ServiceMockOption

func WithCreateRouteOutput

func WithCreateRouteOutput(output *ec2.CreateRouteOutput) ec2ServiceMockOption

func WithCreateRouteTableError

func WithCreateRouteTableError(err error) ec2ServiceMockOption

func WithCreateRouteTableOutputs

func WithCreateRouteTableOutputs(outputs []*ec2.CreateRouteTableOutput) ec2ServiceMockOption

Route table-related options.

func WithCreateSecurityGroupError

func WithCreateSecurityGroupError(err error) ec2ServiceMockOption

func WithCreateSecurityGroupOutput

func WithCreateSecurityGroupOutput(output *ec2.CreateSecurityGroupOutput) ec2ServiceMockOption

Security group-related options.

func WithCreateSubnetError

func WithCreateSubnetError(err error) ec2ServiceMockOption

func WithCreateSubnetOutputs

func WithCreateSubnetOutputs(outputs []*ec2.CreateSubnetOutput) ec2ServiceMockOption

Subnet-related options.

func WithCreateTagsError

func WithCreateTagsError(err error) ec2ServiceMockOption

func WithCreateTagsOutput

func WithCreateTagsOutput(output *ec2.CreateTagsOutput) ec2ServiceMockOption

Tag-related options.

func WithCreateVpcEndpointError

func WithCreateVpcEndpointError(err error) ec2ServiceMockOption

func WithCreateVpcEndpointOutput

func WithCreateVpcEndpointOutput(output *ec2.CreateVpcEndpointOutput) ec2ServiceMockOption

func WithCreateVpcError

func WithCreateVpcError(err error) ec2ServiceMockOption

func WithCreateVpcOutput

func WithCreateVpcOutput(output *ec2.CreateVpcOutput) ec2ServiceMockOption

VPC-related options.

func WithDeleteEgressOnlyInternetGatewayError added in v0.5.0

func WithDeleteEgressOnlyInternetGatewayError(err error) ec2ServiceMockOption

func WithDeleteEgressOnlyInternetGatewayOutput added in v0.5.0

func WithDeleteEgressOnlyInternetGatewayOutput(output *ec2.DeleteEgressOnlyInternetGatewayOutput) ec2ServiceMockOption

func WithDeleteInternetGatewayError

func WithDeleteInternetGatewayError(err error) ec2ServiceMockOption

func WithDeleteInternetGatewayOutput

func WithDeleteInternetGatewayOutput(output *ec2.DeleteInternetGatewayOutput) ec2ServiceMockOption

func WithDeleteNatGatewayError

func WithDeleteNatGatewayError(err error) ec2ServiceMockOption

func WithDeleteNatGatewayOutput

func WithDeleteNatGatewayOutput(output *ec2.DeleteNatGatewayOutput) ec2ServiceMockOption

func WithDeleteNetworkAclError

func WithDeleteNetworkAclError(err error) ec2ServiceMockOption

func WithDeleteNetworkAclOutput

func WithDeleteNetworkAclOutput(output *ec2.DeleteNetworkAclOutput) ec2ServiceMockOption

func WithDeleteNetworkInterfaceError added in v0.5.0

func WithDeleteNetworkInterfaceError(err error) ec2ServiceMockOption

func WithDeleteRouteTableError

func WithDeleteRouteTableError(err error) ec2ServiceMockOption

func WithDeleteRouteTableOutput

func WithDeleteRouteTableOutput(output *ec2.DeleteRouteTableOutput) ec2ServiceMockOption

func WithDeleteSecurityGroupError

func WithDeleteSecurityGroupError(err error) ec2ServiceMockOption

func WithDeleteSecurityGroupErrorsThenSuccess added in v0.5.0

func WithDeleteSecurityGroupErrorsThenSuccess(errs []error) ec2ServiceMockOption

WithDeleteSecurityGroupErrorsThenSuccess fails the first N delete attempts with the given errors, then succeeds. Models AWS releasing a dependency after a delay.

func WithDeleteSecurityGroupOutput

func WithDeleteSecurityGroupOutput(output *ec2.DeleteSecurityGroupOutput) ec2ServiceMockOption

func WithDeleteSubnetError

func WithDeleteSubnetError(err error) ec2ServiceMockOption

func WithDeleteSubnetOutput

func WithDeleteSubnetOutput(output *ec2.DeleteSubnetOutput) ec2ServiceMockOption

func WithDeleteTagsError

func WithDeleteTagsError(err error) ec2ServiceMockOption

func WithDeleteTagsOutput

func WithDeleteTagsOutput(output *ec2.DeleteTagsOutput) ec2ServiceMockOption

func WithDeleteVpcEndpointsError

func WithDeleteVpcEndpointsError(err error) ec2ServiceMockOption

func WithDeleteVpcEndpointsOutput

func WithDeleteVpcEndpointsOutput(output *ec2.DeleteVpcEndpointsOutput) ec2ServiceMockOption

func WithDeleteVpcError

func WithDeleteVpcError(err error) ec2ServiceMockOption

func WithDeleteVpcOutput

func WithDeleteVpcOutput(output *ec2.DeleteVpcOutput) ec2ServiceMockOption

func WithDescribeAvailabilityZonesError

func WithDescribeAvailabilityZonesError(err error) ec2ServiceMockOption

func WithDescribeAvailabilityZonesOutput

func WithDescribeAvailabilityZonesOutput(output *ec2.DescribeAvailabilityZonesOutput) ec2ServiceMockOption

Availability zone-related options.

func WithDescribeEgressOnlyInternetGatewaysError added in v0.5.0

func WithDescribeEgressOnlyInternetGatewaysError(err error) ec2ServiceMockOption

func WithDescribeEgressOnlyInternetGatewaysOutput added in v0.5.0

func WithDescribeEgressOnlyInternetGatewaysOutput(output *ec2.DescribeEgressOnlyInternetGatewaysOutput) ec2ServiceMockOption

func WithDescribeInternetGatewaysError

func WithDescribeInternetGatewaysError(err error) ec2ServiceMockOption

func WithDescribeInternetGatewaysOutput

func WithDescribeInternetGatewaysOutput(output *ec2.DescribeInternetGatewaysOutput) ec2ServiceMockOption

func WithDescribeManagedPrefixListsError added in v0.5.0

func WithDescribeManagedPrefixListsError(err error) ec2ServiceMockOption

func WithDescribeManagedPrefixListsOutput added in v0.5.0

func WithDescribeManagedPrefixListsOutput(output *ec2.DescribeManagedPrefixListsOutput) ec2ServiceMockOption

Managed prefix list-related options.

func WithDescribeNatGatewaysError

func WithDescribeNatGatewaysError(err error) ec2ServiceMockOption

func WithDescribeNatGatewaysOutput

func WithDescribeNatGatewaysOutput(output *ec2.DescribeNatGatewaysOutput) ec2ServiceMockOption

func WithDescribeNetworkAclsError

func WithDescribeNetworkAclsError(err error) ec2ServiceMockOption

func WithDescribeNetworkAclsOutput

func WithDescribeNetworkAclsOutput(output *ec2.DescribeNetworkAclsOutput) ec2ServiceMockOption

func WithDescribeNetworkInterfacesOutputs added in v0.5.0

func WithDescribeNetworkInterfacesOutputs(outputs []*ec2.DescribeNetworkInterfacesOutput) ec2ServiceMockOption

WithDescribeNetworkInterfacesOutputs answers successive describes in order, so a test can model interfaces detaching between polls.

func WithDescribeRouteTablesError

func WithDescribeRouteTablesError(err error) ec2ServiceMockOption

func WithDescribeRouteTablesOutput

func WithDescribeRouteTablesOutput(output *ec2.DescribeRouteTablesOutput) ec2ServiceMockOption

func WithDescribeSecurityGroupRulesError added in v0.5.0

func WithDescribeSecurityGroupRulesError(err error) ec2ServiceMockOption

func WithDescribeSecurityGroupRulesOutput added in v0.5.0

func WithDescribeSecurityGroupRulesOutput(
	output *ec2.DescribeSecurityGroupRulesOutput,
) ec2ServiceMockOption

func WithDescribeSecurityGroupsError

func WithDescribeSecurityGroupsError(err error) ec2ServiceMockOption

func WithDescribeSecurityGroupsOutput

func WithDescribeSecurityGroupsOutput(output *ec2.DescribeSecurityGroupsOutput) ec2ServiceMockOption

func WithDescribeSecurityGroupsOutputs added in v0.5.0

func WithDescribeSecurityGroupsOutputs(outputs []*ec2.DescribeSecurityGroupsOutput) ec2ServiceMockOption

WithDescribeSecurityGroupsOutputs answers successive describes in order, for callers that look groups up more than once in a single operation.

func WithDescribeSubnetsError

func WithDescribeSubnetsError(err error) ec2ServiceMockOption

func WithDescribeSubnetsOutput

func WithDescribeSubnetsOutput(output *ec2.DescribeSubnetsOutput) ec2ServiceMockOption

func WithDescribeVpcAttributeError

func WithDescribeVpcAttributeError(err error) ec2ServiceMockOption

func WithDescribeVpcAttributeOutput

func WithDescribeVpcAttributeOutput(output *ec2.DescribeVpcAttributeOutput) ec2ServiceMockOption

func WithDescribeVpcEndpointsError

func WithDescribeVpcEndpointsError(err error) ec2ServiceMockOption

func WithDescribeVpcEndpointsOutput

func WithDescribeVpcEndpointsOutput(output *ec2.DescribeVpcEndpointsOutput) ec2ServiceMockOption

VPC endpoint-related options.

func WithDescribeVpcsError

func WithDescribeVpcsError(err error) ec2ServiceMockOption

func WithDescribeVpcsOutputs

func WithDescribeVpcsOutputs(outputs []*ec2.DescribeVpcsOutput) ec2ServiceMockOption

func WithDetachInternetGatewayError

func WithDetachInternetGatewayError(err error) ec2ServiceMockOption

func WithDetachInternetGatewayOutput

func WithDetachInternetGatewayOutput(output *ec2.DetachInternetGatewayOutput) ec2ServiceMockOption

func WithDisassociateRouteTableError

func WithDisassociateRouteTableError(err error) ec2ServiceMockOption

func WithDisassociateRouteTableOutput

func WithDisassociateRouteTableOutput(output *ec2.DisassociateRouteTableOutput) ec2ServiceMockOption

func WithModifySubnetAttributeError

func WithModifySubnetAttributeError(err error) ec2ServiceMockOption

func WithModifySubnetAttributeOutput

func WithModifySubnetAttributeOutput(output *ec2.ModifySubnetAttributeOutput) ec2ServiceMockOption

func WithModifyVpcAttributeError

func WithModifyVpcAttributeError(err error) ec2ServiceMockOption

func WithModifyVpcAttributeOutput

func WithModifyVpcAttributeOutput(output *ec2.ModifyVpcAttributeOutput) ec2ServiceMockOption

VPC attribute-related options.

func WithModifyVpcEndpointError

func WithModifyVpcEndpointError(err error) ec2ServiceMockOption

func WithModifyVpcEndpointOutput

func WithModifyVpcEndpointOutput(output *ec2.ModifyVpcEndpointOutput) ec2ServiceMockOption

func WithReleaseAddressError

func WithReleaseAddressError(err error) ec2ServiceMockOption

func WithReleaseAddressOutput

func WithReleaseAddressOutput(output *ec2.ReleaseAddressOutput) ec2ServiceMockOption

func WithReplaceNetworkAclAssociationError

func WithReplaceNetworkAclAssociationError(err error) ec2ServiceMockOption

func WithReplaceNetworkAclAssociationOutput

func WithReplaceNetworkAclAssociationOutput(output *ec2.ReplaceNetworkAclAssociationOutput) ec2ServiceMockOption

func WithRevokeSecurityGroupEgressError

func WithRevokeSecurityGroupEgressError(err error) ec2ServiceMockOption

func WithRevokeSecurityGroupEgressOutput

func WithRevokeSecurityGroupEgressOutput(output *ec2.RevokeSecurityGroupEgressOutput) ec2ServiceMockOption

func WithRevokeSecurityGroupIngressError added in v0.5.0

func WithRevokeSecurityGroupIngressError(err error) ec2ServiceMockOption

func WithRevokeSecurityGroupIngressOutput added in v0.5.0

func WithRevokeSecurityGroupIngressOutput(output *ec2.RevokeSecurityGroupIngressOutput) ec2ServiceMockOption

Types

type Ec2ServiceMock added in v0.5.0

type Ec2ServiceMock struct {
	plugintestutils.MockCalls
	// contains filtered or unexported fields
}

func CreateEc2ServiceMock

func CreateEc2ServiceMock(
	opts ...ec2ServiceMockOption,
) *Ec2ServiceMock

func NewMockService

func NewMockService(t any) *Ec2ServiceMock

func (*Ec2ServiceMock) AllocateAddress added in v0.5.0

func (m *Ec2ServiceMock) AllocateAddress(
	ctx context.Context,
	params *ec2.AllocateAddressInput,
	optFns ...func(*ec2.Options),
) (*ec2.AllocateAddressOutput, error)

Elastic IP methods.

func (*Ec2ServiceMock) AssociateRouteTable added in v0.5.0

func (m *Ec2ServiceMock) AssociateRouteTable(
	ctx context.Context,
	params *ec2.AssociateRouteTableInput,
	optFns ...func(*ec2.Options),
) (*ec2.AssociateRouteTableOutput, error)

func (*Ec2ServiceMock) AttachInternetGateway added in v0.5.0

func (m *Ec2ServiceMock) AttachInternetGateway(
	ctx context.Context,
	params *ec2.AttachInternetGatewayInput,
	optFns ...func(*ec2.Options),
) (*ec2.AttachInternetGatewayOutput, error)

func (*Ec2ServiceMock) AuthorizeSecurityGroupEgress added in v0.5.0

func (m *Ec2ServiceMock) AuthorizeSecurityGroupEgress(
	ctx context.Context,
	params *ec2.AuthorizeSecurityGroupEgressInput,
	optFns ...func(*ec2.Options),
) (*ec2.AuthorizeSecurityGroupEgressOutput, error)

func (*Ec2ServiceMock) AuthorizeSecurityGroupIngress added in v0.5.0

func (m *Ec2ServiceMock) AuthorizeSecurityGroupIngress(
	ctx context.Context,
	params *ec2.AuthorizeSecurityGroupIngressInput,
	optFns ...func(*ec2.Options),
) (*ec2.AuthorizeSecurityGroupIngressOutput, error)

Security group ingress methods.

func (*Ec2ServiceMock) CreateEgressOnlyInternetGateway added in v0.5.0

func (m *Ec2ServiceMock) CreateEgressOnlyInternetGateway(
	ctx context.Context,
	params *ec2.CreateEgressOnlyInternetGatewayInput,
	optFns ...func(*ec2.Options),
) (*ec2.CreateEgressOnlyInternetGatewayOutput, error)

func (*Ec2ServiceMock) CreateInternetGateway added in v0.5.0

func (m *Ec2ServiceMock) CreateInternetGateway(
	ctx context.Context,
	params *ec2.CreateInternetGatewayInput,
	optFns ...func(*ec2.Options),
) (*ec2.CreateInternetGatewayOutput, error)

Internet gateway methods.

func (*Ec2ServiceMock) CreateNatGateway added in v0.5.0

func (m *Ec2ServiceMock) CreateNatGateway(
	ctx context.Context,
	params *ec2.CreateNatGatewayInput,
	optFns ...func(*ec2.Options),
) (*ec2.CreateNatGatewayOutput, error)

NAT gateway methods.

func (*Ec2ServiceMock) CreateNetworkAcl added in v0.5.0

func (m *Ec2ServiceMock) CreateNetworkAcl(
	ctx context.Context,
	params *ec2.CreateNetworkAclInput,
	optFns ...func(*ec2.Options),
) (*ec2.CreateNetworkAclOutput, error)

Network ACL methods.

func (*Ec2ServiceMock) CreateNetworkAclEntry added in v0.5.0

func (m *Ec2ServiceMock) CreateNetworkAclEntry(
	ctx context.Context,
	params *ec2.CreateNetworkAclEntryInput,
	optFns ...func(*ec2.Options),
) (*ec2.CreateNetworkAclEntryOutput, error)

func (*Ec2ServiceMock) CreateRoute added in v0.5.0

func (m *Ec2ServiceMock) CreateRoute(
	ctx context.Context,
	params *ec2.CreateRouteInput,
	optFns ...func(*ec2.Options),
) (*ec2.CreateRouteOutput, error)

func (*Ec2ServiceMock) CreateRouteInputs added in v0.5.0

func (m *Ec2ServiceMock) CreateRouteInputs() []*ec2.CreateRouteInput

CreateRouteInputs returns every route the caller asked for, in order.

MockCalls can only assert on a call at a known index, and a VPC creates one route per subnet per address family, so pinning an index would couple the assertion to the order subnets happen to be iterated in. Tests that care which gateway a route points at read the inputs instead.

func (*Ec2ServiceMock) CreateRouteTable added in v0.5.0

func (m *Ec2ServiceMock) CreateRouteTable(
	ctx context.Context,
	params *ec2.CreateRouteTableInput,
	optFns ...func(*ec2.Options),
) (*ec2.CreateRouteTableOutput, error)

Route table methods.

func (*Ec2ServiceMock) CreateSecurityGroup added in v0.5.0

func (m *Ec2ServiceMock) CreateSecurityGroup(
	ctx context.Context,
	params *ec2.CreateSecurityGroupInput,
	optFns ...func(*ec2.Options),
) (*ec2.CreateSecurityGroupOutput, error)

Security group methods.

func (*Ec2ServiceMock) CreateSubnet added in v0.5.0

func (m *Ec2ServiceMock) CreateSubnet(
	ctx context.Context,
	params *ec2.CreateSubnetInput,
	optFns ...func(*ec2.Options),
) (*ec2.CreateSubnetOutput, error)

Subnet methods.

func (*Ec2ServiceMock) CreateTags added in v0.5.0

func (m *Ec2ServiceMock) CreateTags(
	ctx context.Context,
	params *ec2.CreateTagsInput,
	optFns ...func(*ec2.Options),
) (*ec2.CreateTagsOutput, error)

Tag methods.

func (*Ec2ServiceMock) CreateVpc added in v0.5.0

func (m *Ec2ServiceMock) CreateVpc(
	ctx context.Context,
	params *ec2.CreateVpcInput,
	optFns ...func(*ec2.Options),
) (*ec2.CreateVpcOutput, error)

VPC methods.

func (*Ec2ServiceMock) CreateVpcEndpoint added in v0.5.0

func (m *Ec2ServiceMock) CreateVpcEndpoint(
	ctx context.Context,
	params *ec2.CreateVpcEndpointInput,
	optFns ...func(*ec2.Options),
) (*ec2.CreateVpcEndpointOutput, error)

func (*Ec2ServiceMock) DeleteEgressOnlyInternetGateway added in v0.5.0

func (m *Ec2ServiceMock) DeleteEgressOnlyInternetGateway(
	ctx context.Context,
	params *ec2.DeleteEgressOnlyInternetGatewayInput,
	optFns ...func(*ec2.Options),
) (*ec2.DeleteEgressOnlyInternetGatewayOutput, error)

func (*Ec2ServiceMock) DeleteInternetGateway added in v0.5.0

func (m *Ec2ServiceMock) DeleteInternetGateway(
	ctx context.Context,
	params *ec2.DeleteInternetGatewayInput,
	optFns ...func(*ec2.Options),
) (*ec2.DeleteInternetGatewayOutput, error)

func (*Ec2ServiceMock) DeleteNatGateway added in v0.5.0

func (m *Ec2ServiceMock) DeleteNatGateway(
	ctx context.Context,
	params *ec2.DeleteNatGatewayInput,
	optFns ...func(*ec2.Options),
) (*ec2.DeleteNatGatewayOutput, error)

func (*Ec2ServiceMock) DeleteNetworkAcl added in v0.5.0

func (m *Ec2ServiceMock) DeleteNetworkAcl(
	ctx context.Context,
	params *ec2.DeleteNetworkAclInput,
	optFns ...func(*ec2.Options),
) (*ec2.DeleteNetworkAclOutput, error)

func (*Ec2ServiceMock) DeleteNetworkInterface added in v0.5.0

func (m *Ec2ServiceMock) DeleteNetworkInterface(
	ctx context.Context,
	params *ec2.DeleteNetworkInterfaceInput,
	optFns ...func(*ec2.Options),
) (*ec2.DeleteNetworkInterfaceOutput, error)

func (*Ec2ServiceMock) DeleteRouteTable added in v0.5.0

func (m *Ec2ServiceMock) DeleteRouteTable(
	ctx context.Context,
	params *ec2.DeleteRouteTableInput,
	optFns ...func(*ec2.Options),
) (*ec2.DeleteRouteTableOutput, error)

func (*Ec2ServiceMock) DeleteSecurityGroup added in v0.5.0

func (m *Ec2ServiceMock) DeleteSecurityGroup(
	ctx context.Context,
	params *ec2.DeleteSecurityGroupInput,
	optFns ...func(*ec2.Options),
) (*ec2.DeleteSecurityGroupOutput, error)

func (*Ec2ServiceMock) DeleteSecurityGroupCallCount added in v0.5.0

func (m *Ec2ServiceMock) DeleteSecurityGroupCallCount() int

DeleteSecurityGroupCallCount reports how many delete attempts were made, which is what distinguishes a caller that waits for a group to be released from one that gives up after the first failure.

func (*Ec2ServiceMock) DeleteSubnet added in v0.5.0

func (m *Ec2ServiceMock) DeleteSubnet(
	ctx context.Context,
	params *ec2.DeleteSubnetInput,
	optFns ...func(*ec2.Options),
) (*ec2.DeleteSubnetOutput, error)

func (*Ec2ServiceMock) DeleteTags added in v0.5.0

func (m *Ec2ServiceMock) DeleteTags(
	ctx context.Context,
	params *ec2.DeleteTagsInput,
	optFns ...func(*ec2.Options),
) (*ec2.DeleteTagsOutput, error)

func (*Ec2ServiceMock) DeleteVpc added in v0.5.0

func (m *Ec2ServiceMock) DeleteVpc(
	ctx context.Context,
	params *ec2.DeleteVpcInput,
	optFns ...func(*ec2.Options),
) (*ec2.DeleteVpcOutput, error)

func (*Ec2ServiceMock) DeleteVpcEndpoints added in v0.5.0

func (m *Ec2ServiceMock) DeleteVpcEndpoints(
	ctx context.Context,
	params *ec2.DeleteVpcEndpointsInput,
	optFns ...func(*ec2.Options),
) (*ec2.DeleteVpcEndpointsOutput, error)

func (*Ec2ServiceMock) DeletedNetworkInterfaceIDs added in v0.5.0

func (m *Ec2ServiceMock) DeletedNetworkInterfaceIDs() []string

DeletedNetworkInterfaceIDs reports the interfaces the caller reaped, in order.

func (*Ec2ServiceMock) DeletedSecurityGroupIDs added in v0.5.0

func (m *Ec2ServiceMock) DeletedSecurityGroupIDs() []string

DeletedSecurityGroupIDs reports the groups the caller deleted, in order.

func (*Ec2ServiceMock) DescribeAvailabilityZones added in v0.5.0

func (m *Ec2ServiceMock) DescribeAvailabilityZones(
	ctx context.Context,
	params *ec2.DescribeAvailabilityZonesInput,
	optFns ...func(*ec2.Options),
) (*ec2.DescribeAvailabilityZonesOutput, error)

Availability zone methods.

func (*Ec2ServiceMock) DescribeEgressOnlyInternetGateways added in v0.5.0

func (m *Ec2ServiceMock) DescribeEgressOnlyInternetGateways(
	ctx context.Context,
	params *ec2.DescribeEgressOnlyInternetGatewaysInput,
	optFns ...func(*ec2.Options),
) (*ec2.DescribeEgressOnlyInternetGatewaysOutput, error)

func (*Ec2ServiceMock) DescribeInternetGateways added in v0.5.0

func (m *Ec2ServiceMock) DescribeInternetGateways(
	ctx context.Context,
	params *ec2.DescribeInternetGatewaysInput,
	optFns ...func(*ec2.Options),
) (*ec2.DescribeInternetGatewaysOutput, error)

func (*Ec2ServiceMock) DescribeManagedPrefixLists added in v0.5.0

func (m *Ec2ServiceMock) DescribeManagedPrefixLists(
	ctx context.Context,
	params *ec2.DescribeManagedPrefixListsInput,
	optFns ...func(*ec2.Options),
) (*ec2.DescribeManagedPrefixListsOutput, error)

func (*Ec2ServiceMock) DescribeNatGateways added in v0.5.0

func (m *Ec2ServiceMock) DescribeNatGateways(
	ctx context.Context,
	params *ec2.DescribeNatGatewaysInput,
	optFns ...func(*ec2.Options),
) (*ec2.DescribeNatGatewaysOutput, error)

func (*Ec2ServiceMock) DescribeNetworkAcls added in v0.5.0

func (m *Ec2ServiceMock) DescribeNetworkAcls(
	ctx context.Context,
	params *ec2.DescribeNetworkAclsInput,
	optFns ...func(*ec2.Options),
) (*ec2.DescribeNetworkAclsOutput, error)

func (*Ec2ServiceMock) DescribeNetworkInterfaces added in v0.5.0

func (m *Ec2ServiceMock) DescribeNetworkInterfaces(
	ctx context.Context,
	params *ec2.DescribeNetworkInterfacesInput,
	optFns ...func(*ec2.Options),
) (*ec2.DescribeNetworkInterfacesOutput, error)

func (*Ec2ServiceMock) DescribeRouteTables added in v0.5.0

func (m *Ec2ServiceMock) DescribeRouteTables(
	ctx context.Context,
	params *ec2.DescribeRouteTablesInput,
	optFns ...func(*ec2.Options),
) (*ec2.DescribeRouteTablesOutput, error)

func (*Ec2ServiceMock) DescribeSecurityGroupRules added in v0.5.0

func (m *Ec2ServiceMock) DescribeSecurityGroupRules(
	ctx context.Context,
	params *ec2.DescribeSecurityGroupRulesInput,
	optFns ...func(*ec2.Options),
) (*ec2.DescribeSecurityGroupRulesOutput, error)

func (*Ec2ServiceMock) DescribeSecurityGroups added in v0.5.0

func (m *Ec2ServiceMock) DescribeSecurityGroups(
	ctx context.Context,
	params *ec2.DescribeSecurityGroupsInput,
	optFns ...func(*ec2.Options),
) (*ec2.DescribeSecurityGroupsOutput, error)

func (*Ec2ServiceMock) DescribeSubnets added in v0.5.0

func (m *Ec2ServiceMock) DescribeSubnets(
	ctx context.Context,
	params *ec2.DescribeSubnetsInput,
	optFns ...func(*ec2.Options),
) (*ec2.DescribeSubnetsOutput, error)

func (*Ec2ServiceMock) DescribeVpcAttribute added in v0.5.0

func (m *Ec2ServiceMock) DescribeVpcAttribute(
	ctx context.Context,
	params *ec2.DescribeVpcAttributeInput,
	optFns ...func(*ec2.Options),
) (*ec2.DescribeVpcAttributeOutput, error)

func (*Ec2ServiceMock) DescribeVpcEndpoints added in v0.5.0

func (m *Ec2ServiceMock) DescribeVpcEndpoints(
	ctx context.Context,
	params *ec2.DescribeVpcEndpointsInput,
	optFns ...func(*ec2.Options),
) (*ec2.DescribeVpcEndpointsOutput, error)

VPC endpoint methods.

func (*Ec2ServiceMock) DescribeVpcs added in v0.5.0

func (m *Ec2ServiceMock) DescribeVpcs(
	ctx context.Context,
	params *ec2.DescribeVpcsInput,
	optFns ...func(*ec2.Options),
) (*ec2.DescribeVpcsOutput, error)

func (*Ec2ServiceMock) DetachInternetGateway added in v0.5.0

func (m *Ec2ServiceMock) DetachInternetGateway(
	ctx context.Context,
	params *ec2.DetachInternetGatewayInput,
	optFns ...func(*ec2.Options),
) (*ec2.DetachInternetGatewayOutput, error)

func (*Ec2ServiceMock) DisassociateRouteTable added in v0.5.0

func (m *Ec2ServiceMock) DisassociateRouteTable(
	ctx context.Context,
	params *ec2.DisassociateRouteTableInput,
	optFns ...func(*ec2.Options),
) (*ec2.DisassociateRouteTableOutput, error)

func (*Ec2ServiceMock) FirstDeleteSecurityGroupCallOrder added in v0.5.0

func (m *Ec2ServiceMock) FirstDeleteSecurityGroupCallOrder() int

func (*Ec2ServiceMock) LastRevokeCallOrder added in v0.5.0

func (m *Ec2ServiceMock) LastRevokeCallOrder() int

LastRevokeCallOrder and FirstDeleteSecurityGroupCallOrder let a test assert that all rules were revoked before any group was deleted, which is what stops groups that reference each other blocking one another.

func (*Ec2ServiceMock) ModifySubnetAttribute added in v0.5.0

func (m *Ec2ServiceMock) ModifySubnetAttribute(
	ctx context.Context,
	params *ec2.ModifySubnetAttributeInput,
	optFns ...func(*ec2.Options),
) (*ec2.ModifySubnetAttributeOutput, error)

func (*Ec2ServiceMock) ModifyVpcAttribute added in v0.5.0

func (m *Ec2ServiceMock) ModifyVpcAttribute(
	ctx context.Context,
	params *ec2.ModifyVpcAttributeInput,
	optFns ...func(*ec2.Options),
) (*ec2.ModifyVpcAttributeOutput, error)

func (*Ec2ServiceMock) ModifyVpcEndpoint added in v0.5.0

func (m *Ec2ServiceMock) ModifyVpcEndpoint(
	ctx context.Context,
	params *ec2.ModifyVpcEndpointInput,
	optFns ...func(*ec2.Options),
) (*ec2.ModifyVpcEndpointOutput, error)

func (*Ec2ServiceMock) ReleaseAddress added in v0.5.0

func (m *Ec2ServiceMock) ReleaseAddress(
	ctx context.Context,
	params *ec2.ReleaseAddressInput,
	optFns ...func(*ec2.Options),
) (*ec2.ReleaseAddressOutput, error)

func (*Ec2ServiceMock) ReplaceNetworkAclAssociation added in v0.5.0

func (m *Ec2ServiceMock) ReplaceNetworkAclAssociation(
	ctx context.Context,
	params *ec2.ReplaceNetworkAclAssociationInput,
	optFns ...func(*ec2.Options),
) (*ec2.ReplaceNetworkAclAssociationOutput, error)

func (*Ec2ServiceMock) RevokeSecurityGroupEgress added in v0.5.0

func (m *Ec2ServiceMock) RevokeSecurityGroupEgress(
	ctx context.Context,
	params *ec2.RevokeSecurityGroupEgressInput,
	optFns ...func(*ec2.Options),
) (*ec2.RevokeSecurityGroupEgressOutput, error)

func (*Ec2ServiceMock) RevokeSecurityGroupIngress added in v0.5.0

func (m *Ec2ServiceMock) RevokeSecurityGroupIngress(
	ctx context.Context,
	params *ec2.RevokeSecurityGroupIngressInput,
	optFns ...func(*ec2.Options),
) (*ec2.RevokeSecurityGroupIngressOutput, error)

Jump to

Keyboard shortcuts

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