Class LoadBalancerBackendServerPolicy


  • public class LoadBalancerBackendServerPolicy
    extends com.pulumi.resources.CustomResource
    Attaches a load balancer policy to an ELB backend server. ## Example Usage <!--Start PulumiCodeChooser -->
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.elb.LoadBalancer;
     import com.pulumi.aws.elb.LoadBalancerArgs;
     import com.pulumi.aws.elb.inputs.LoadBalancerListenerArgs;
     import com.pulumi.aws.elb.LoadBalancerPolicy;
     import com.pulumi.aws.elb.LoadBalancerPolicyArgs;
     import com.pulumi.aws.elb.inputs.LoadBalancerPolicyPolicyAttributeArgs;
     import com.pulumi.aws.elb.LoadBalancerBackendServerPolicy;
     import com.pulumi.aws.elb.LoadBalancerBackendServerPolicyArgs;
     import java.util.List;
     import java.util.ArrayList;
     import java.util.Map;
     import java.io.File;
     import java.nio.file.Files;
     import java.nio.file.Paths;
     
     public class App {
         public static void main(String[] args) {
             Pulumi.run(App::stack);
         }
     
         public static void stack(Context ctx) {
             var wu_tang = new LoadBalancer("wu-tang", LoadBalancerArgs.builder()
                 .name("wu-tang")
                 .availabilityZones("us-east-1a")
                 .listeners(LoadBalancerListenerArgs.builder()
                     .instancePort(443)
                     .instanceProtocol("http")
                     .lbPort(443)
                     .lbProtocol("https")
                     .sslCertificateId("arn:aws:iam::000000000000:server-certificate/wu-tang.net")
                     .build())
                 .tags(Map.of("Name", "wu-tang"))
                 .build());
     
             var wu_tang_ca_pubkey_policy = new LoadBalancerPolicy("wu-tang-ca-pubkey-policy", LoadBalancerPolicyArgs.builder()
                 .loadBalancerName(wu_tang.name())
                 .policyName("wu-tang-ca-pubkey-policy")
                 .policyTypeName("PublicKeyPolicyType")
                 .policyAttributes(LoadBalancerPolicyPolicyAttributeArgs.builder()
                     .name("PublicKey")
                     .value(StdFunctions.file(FileArgs.builder()
                         .input("wu-tang-pubkey")
                         .build()).result())
                     .build())
                 .build());
     
             var wu_tang_root_ca_backend_auth_policy = new LoadBalancerPolicy("wu-tang-root-ca-backend-auth-policy", LoadBalancerPolicyArgs.builder()
                 .loadBalancerName(wu_tang.name())
                 .policyName("wu-tang-root-ca-backend-auth-policy")
                 .policyTypeName("BackendServerAuthenticationPolicyType")
                 .policyAttributes(LoadBalancerPolicyPolicyAttributeArgs.builder()
                     .name("PublicKeyPolicyName")
                     .value(wu_tang_root_ca_pubkey_policy.policyName())
                     .build())
                 .build());
     
             var wu_tang_backend_auth_policies_443 = new LoadBalancerBackendServerPolicy("wu-tang-backend-auth-policies-443", LoadBalancerBackendServerPolicyArgs.builder()
                 .loadBalancerName(wu_tang.name())
                 .instancePort(443)
                 .policyNames(wu_tang_root_ca_backend_auth_policy.policyName())
                 .build());
     
         }
     }
     
     
    <!--End PulumiCodeChooser -->
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static LoadBalancerBackendServerPolicy get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, LoadBalancerBackendServerPolicyState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.lang.Integer> instancePort()  
      com.pulumi.core.Output<java.lang.String> loadBalancerName()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> policyNames()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LoadBalancerBackendServerPolicy

        public LoadBalancerBackendServerPolicy​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • LoadBalancerBackendServerPolicy

        public LoadBalancerBackendServerPolicy​(java.lang.String name,
                                               LoadBalancerBackendServerPolicyArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • LoadBalancerBackendServerPolicy

        public LoadBalancerBackendServerPolicy​(java.lang.String name,
                                               LoadBalancerBackendServerPolicyArgs args,
                                               @Nullable
                                               com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • instancePort

        public com.pulumi.core.Output<java.lang.Integer> instancePort()
        Returns:
        The instance port to apply the policy to.
      • loadBalancerName

        public com.pulumi.core.Output<java.lang.String> loadBalancerName()
        Returns:
        The load balancer to attach the policy to.
      • policyNames

        public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> policyNames()
        Returns:
        List of Policy Names to apply to the backend server.
      • get

        public static LoadBalancerBackendServerPolicy get​(java.lang.String name,
                                                          com.pulumi.core.Output<java.lang.String> id,
                                                          @Nullable
                                                          LoadBalancerBackendServerPolicyState state,
                                                          @Nullable
                                                          com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.