Interface SecurityGroupApi

  • All Known Subinterfaces:
    AWSSecurityGroupApi

    public interface SecurityGroupApi
    Provides access to EC2 via their REST API.

    • Method Detail

      • createSecurityGroupInRegion

        @Named("CreateSecurityGroup")
        @POST
        @Path("/")
        void createSecurityGroupInRegion​(@Nullable
                                         String region,
                                         @FormParam("GroupName")
                                         String name,
                                         @FormParam("GroupDescription")
                                         String description)
        Creates a new security group. Group names must be unique per identity.
        Parameters:
        region - Security groups are not copied across Regions. Instances within the Region cannot communicate with instances outside the Region using group-based firewall rules. Traffic from instances in another Region is seen as WAN bandwidth.
        name - Name of the security group. Accepts alphanumeric characters, spaces, dashes, and underscores.
        description - Description of the group. This is informational only. If the description contains spaces, you must enc lose it in single quotes (') or URL-encode it. Accepts alphanumeric characters, spaces, dashes, and underscores.
        See Also:
        #runInstances, #describeSecurityGroups, #authorizeSecurityGroupIngress, #revokeSecurityGroupIngress, #deleteSecurityGroup,
      • deleteSecurityGroupInRegionById

        @Named("DeleteSecurityGroup")
        @POST
        @Path("/")
        void deleteSecurityGroupInRegionById​(@Nullable
                                             String region,
                                             @FormParam("GroupId")
                                             String id)
        Deletes a security group by ID.
        Parameters:
        region - Security groups are not copied across Regions. Instances within the Region cannot communicate with instances outside the Region using group-based firewall rules. Traffic from instances in another Region is seen as WAN bandwidth.
        id - ID of the security group to delete.
        See Also:
        #describeSecurityGroups, #authorizeSecurityGroupIngress, #revokeSecurityGroupIngress, #createSecurityGroup,
      • deleteSecurityGroupInRegion

        @Named("DeleteSecurityGroup")
        @POST
        @Path("/")
        void deleteSecurityGroupInRegion​(@Nullable
                                         String region,
                                         @FormParam("GroupName")
                                         String name)
        Deletes a security group that you own.
        Parameters:
        region - Security groups are not copied across Regions. Instances within the Region cannot communicate with instances outside the Region using group-based firewall rules. Traffic from instances in another Region is seen as WAN bandwidth.
        name - Name of the security group to delete.
        See Also:
        #describeSecurityGroups, #authorizeSecurityGroupIngress, #revokeSecurityGroupIngress, #createSecurityGroup,
      • describeSecurityGroupsInRegion

        @Named("DescribeSecurityGroups")
        @POST
        @Path("/")
        Set<SecurityGroup> describeSecurityGroupsInRegion​(@Nullable
                                                          String region,
                                                          String... securityGroupNames)
        Returns information about security groups that you own.

        NOTE Works with groups in default VPC only

        Parameters:
        region - Security groups are not copied across Regions. Instances within the Region cannot communicate with instances outside the Region using group-based firewall rules. Traffic from instances in another Region is seen as WAN bandwidth.
        securityGroupNames - Name of the security groups
        See Also:
        #createSecurityGroup, #authorizeSecurityGroupIngress, #revokeSecurityGroupIngress, #deleteSecurityGroup,
      • describeSecurityGroupsInRegionWithFilter

        @Named("DescribeSecurityGroups")
        @POST
        @Path("/")
        Set<SecurityGroup> describeSecurityGroupsInRegionWithFilter​(@Nullable
                                                                    String region,
                                                                    com.google.common.collect.Multimap<String,​String> filter)
        Returns information about security groups that you own.
        Parameters:
        region - Security groups are not copied across Regions. Instances within the Region cannot communicate with instances outside the Region using group-based firewall rules. Traffic from instances in another Region is seen as WAN bandwidth.
        filter - Multimap of filter key/values.
        See Also:
        #createSecurityGroup, #authorizeSecurityGroupIngress, #revokeSecurityGroupIngress, #deleteSecurityGroup,
      • authorizeSecurityGroupIngressInRegion

        @Named("AuthorizeSecurityGroupIngress")
        @POST
        @Path("/")
        void authorizeSecurityGroupIngressInRegion​(@Nullable
                                                   String region,
                                                   @FormParam("GroupName")
                                                   String groupName,
                                                   UserIdGroupPair sourceSecurityGroup)
        Adds permissions to a security group based on another group.
        Parameters:
        region - Security groups are not copied across Regions. Instances within the Region cannot communicate with instances outside the Region using group-based firewall rules. Traffic from instances in another Region is seen as WAN bandwidth.
        groupName - Name of the group to modify. The name must be valid and belong to the identity
        sourceSecurityGroup - group to associate with this group.
        See Also:
        #createSecurityGroup, #describeSecurityGroups, #revokeSecurityGroupIngress, #deleteSecurityGroup,
      • authorizeSecurityGroupIngressInRegion

        @Named("AuthorizeSecurityGroupIngress")
        @POST
        @Path("/")
        void authorizeSecurityGroupIngressInRegion​(@Nullable
                                                   String region,
                                                   @FormParam("GroupName")
                                                   String groupName,
                                                   @FormParam("IpProtocol")
                                                   IpProtocol ipProtocol,
                                                   @FormParam("FromPort")
                                                   int fromPort,
                                                   @FormParam("ToPort")
                                                   int toPort,
                                                   @FormParam("CidrIp")
                                                   String cidrIp)
        Adds permissions to a security group.

        Permissions are specified by the IP protocol (TCP, UDP or ICMP), the source of the request (by IP range or an Amazon EC2 user-group pair), the source and destination port ranges (for TCP and UDP), and the ICMP codes and types (for ICMP). When authorizing ICMP, -1 can be used as a wildcard in the type and code fields. Permission changes are propagated to instances within the security group as quickly as possible. However, depending on the number of instances, a small delay might occur.

        Parameters:
        region - Security groups are not copied across Regions. Instances within the Region cannot communicate with instances outside the Region using group-based firewall rules. Traffic from instances in another Region is seen as WAN bandwidth.
        groupName - Name of the group to modify. The name must be valid and belong to the identity
        ipProtocol - IP protocol.
        fromPort - Start of port range for the TCP and UDP protocols, or an ICMP type number. An ICMP type number of -1 indicates a wildcard (i.e., any ICMP type number).
        toPort - End of port range for the TCP and UDP protocols, or an ICMP code. An ICMP code of -1 indicates a wildcard (i.e., any ICMP code).
        cidrIp - CIDR range.
        See Also:
        #createSecurityGroup, #describeSecurityGroups, #revokeSecurityGroupIngress, #deleteSecurityGroup,
      • revokeSecurityGroupIngressInRegion

        @Named("RevokeSecurityGroupIngress")
        @POST
        @Path("/")
        void revokeSecurityGroupIngressInRegion​(@Nullable
                                                String region,
                                                @FormParam("GroupName")
                                                String groupName,
                                                UserIdGroupPair sourceSecurityGroup)
        Revokes permissions from a security group. The permissions used to revoke must be specified using the same values used to grant the permissions.
        Parameters:
        region - Security groups are not copied across Regions. Instances within the Region cannot communicate with instances outside the Region using group-based firewall rules. Traffic from instances in another Region is seen as WAN bandwidth.
        groupName - Name of the group to modify. The name must be valid and belong to the identity
        sourceSecurityGroup - group to associate with this group.
        See Also:
        #createSecurityGroup, #describeSecurityGroups, #authorizeSecurityGroupIngress, #deleteSecurityGroup,
      • revokeSecurityGroupIngressInRegion

        @Named("RevokeSecurityGroupIngress")
        @POST
        @Path("/")
        void revokeSecurityGroupIngressInRegion​(@Nullable
                                                String region,
                                                @FormParam("GroupName")
                                                String groupName,
                                                @FormParam("IpProtocol")
                                                IpProtocol ipProtocol,
                                                @FormParam("FromPort")
                                                int fromPort,
                                                @FormParam("ToPort")
                                                int toPort,
                                                @FormParam("CidrIp")
                                                String cidrIp)
        Revokes permissions from a security group. The permissions used to revoke must be specified using the same values used to grant the permissions.

        Permissions are specified by IP protocol (TCP, UDP, or ICMP), the source of the request (by IP range or an Amazon EC2 user-group pair), the source and destination port ranges (for TCP and UDP), and the ICMP codes and types (for ICMP). Permission changes are quickly propagated to instances within the security group. However, depending on the number of instances in the group, a small delay is might occur.

        Parameters:
        region - Security groups are not copied across Regions. Instances within the Region cannot communicate with instances outside the Region using group-based firewall rules. Traffic from instances in another Region is seen as WAN bandwidth.
        groupName - Name of the group to modify. The name must be valid and belong to the identity
        ipProtocol - IP protocol.
        fromPort - Start of port range for the TCP and UDP protocols, or an ICMP type number. An ICMP type number of -1 indicates a wildcard (i.e., any ICMP type number).
        toPort - End of port range for the TCP and UDP protocols, or an ICMP code. An ICMP code of -1 indicates a wildcard (i.e., any ICMP code).
        cidrIp - CIDR range.
        See Also:
        #createSecurityGroup, #describeSecurityGroups, #authorizeSecurityGroupIngress, #deleteSecurityGroup,