Class Workforce


  • public class Workforce
    extends com.pulumi.resources.CustomResource
    Provides a SageMaker AI Workforce resource. ## Example Usage ### Cognito Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.cognito.UserPool;
     import com.pulumi.aws.cognito.UserPoolArgs;
     import com.pulumi.aws.cognito.UserPoolClient;
     import com.pulumi.aws.cognito.UserPoolClientArgs;
     import com.pulumi.aws.cognito.UserPoolDomain;
     import com.pulumi.aws.cognito.UserPoolDomainArgs;
     import com.pulumi.aws.sagemaker.Workforce;
     import com.pulumi.aws.sagemaker.WorkforceArgs;
     import com.pulumi.aws.sagemaker.inputs.WorkforceCognitoConfigArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     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 exampleUserPool = new UserPool("exampleUserPool", UserPoolArgs.builder()
                 .name("example")
                 .build());
     
             var exampleUserPoolClient = new UserPoolClient("exampleUserPoolClient", UserPoolClientArgs.builder()
                 .name("example")
                 .generateSecret(true)
                 .userPoolId(exampleUserPool.id())
                 .build());
     
             var exampleUserPoolDomain = new UserPoolDomain("exampleUserPoolDomain", UserPoolDomainArgs.builder()
                 .domain("example")
                 .userPoolId(exampleUserPool.id())
                 .build());
     
             var example = new Workforce("example", WorkforceArgs.builder()
                 .cognitoConfig(WorkforceCognitoConfigArgs.builder()
                     .clientId(exampleUserPoolClient.id())
                     .userPool(exampleUserPoolDomain.userPoolId())
                     .build())
                 .workforceName("example")
                 .build());
     
         }
     }
     
     
    ### OIDC Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.sagemaker.Workforce;
     import com.pulumi.aws.sagemaker.WorkforceArgs;
     import com.pulumi.aws.sagemaker.inputs.WorkforceOidcConfigArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     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 example = new Workforce("example", WorkforceArgs.builder()
                 .oidcConfig(WorkforceOidcConfigArgs.builder()
                     .authorizationEndpoint("https://example.com")
                     .clientId("example")
                     .clientSecret("example")
                     .issuer("https://example.com")
                     .jwksUri("https://example.com")
                     .logoutEndpoint("https://example.com")
                     .tokenEndpoint("https://example.com")
                     .userInfoEndpoint("https://example.com")
                     .build())
                 .workforceName("example")
                 .build());
     
         }
     }
     
     
    ## Import Using `pulumi import`, import SageMaker AI Workforces using the `workforceName`. For example: ```sh $ pulumi import aws:sagemaker/workforce:Workforce example example ```
    • 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
    • Constructor Summary

      Constructors 
      Constructor Description
      Workforce​(java.lang.String name)  
      Workforce​(java.lang.String name, WorkforceArgs args)  
      Workforce​(java.lang.String name, WorkforceArgs args, com.pulumi.resources.CustomResourceOptions options)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> arn()  
      com.pulumi.core.Output<java.util.Optional<WorkforceCognitoConfig>> cognitoConfig()  
      static Workforce get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, WorkforceState 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.util.Optional<WorkforceOidcConfig>> oidcConfig()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<WorkforceSourceIpConfig> sourceIpConfig()  
      com.pulumi.core.Output<java.lang.String> subdomain()  
      com.pulumi.core.Output<java.lang.String> workforceName()  
      com.pulumi.core.Output<java.util.Optional<WorkforceWorkforceVpcConfig>> workforceVpcConfig()  
      • 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

      • Workforce

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

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

        public Workforce​(java.lang.String name,
                         WorkforceArgs 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

      • arn

        public com.pulumi.core.Output<java.lang.String> arn()
        Returns:
        ARN assigned by AWS to this Workforce.
      • cognitoConfig

        public com.pulumi.core.Output<java.util.Optional<WorkforceCognitoConfig>> cognitoConfig()
        Returns:
        Use this parameter to configure an Amazon Cognito private workforce. A single Cognito workforce is created using and corresponds to a single Amazon Cognito user pool. Conflicts with `oidcConfig`. see Cognito Config details below.
      • oidcConfig

        public com.pulumi.core.Output<java.util.Optional<WorkforceOidcConfig>> oidcConfig()
        Returns:
        Use this parameter to configure a private workforce using your own OIDC Identity Provider. Conflicts with `cognitoConfig`. see OIDC Config details below.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • sourceIpConfig

        public com.pulumi.core.Output<WorkforceSourceIpConfig> sourceIpConfig()
        Returns:
        A list of IP address ranges Used to create an allow list of IP addresses for a private workforce. By default, a workforce isn't restricted to specific IP addresses. see Source IP Config details below.
      • subdomain

        public com.pulumi.core.Output<java.lang.String> subdomain()
        Returns:
        The subdomain for your OIDC Identity Provider.
      • workforceName

        public com.pulumi.core.Output<java.lang.String> workforceName()
        Returns:
        The name of the Workforce (must be unique).
      • workforceVpcConfig

        public com.pulumi.core.Output<java.util.Optional<WorkforceWorkforceVpcConfig>> workforceVpcConfig()
        Returns:
        configure a workforce using VPC. see Workforce VPC Config details below.
      • get

        public static Workforce get​(java.lang.String name,
                                    com.pulumi.core.Output<java.lang.String> id,
                                    @Nullable
                                    WorkforceState 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.