Class CfnWorkforce

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IEnvironmentAware, IWorkforceRef, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-09-02T11:03:18.844Z") @Stability(Stable) public class CfnWorkforce extends CfnResource implements IInspectable, IWorkforceRef, ITaggableV2
Resource Type definition for AWS::SageMaker::Workforce.

Use to create a private workforce that you can use to label your training data using Amazon SageMaker Ground Truth.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.sagemaker.*;
 CfnWorkforce cfnWorkforce = CfnWorkforce.Builder.create(this, "MyCfnWorkforce")
         .workforceName("workforceName")
         // the properties below are optional
         .cognitoConfig(CognitoConfigProperty.builder()
                 .clientId("clientId")
                 .userPool("userPool")
                 .build())
         .ipAddressType("ipAddressType")
         .oidcConfig(OidcConfigProperty.builder()
                 .authorizationEndpoint("authorizationEndpoint")
                 .clientId("clientId")
                 .issuer("issuer")
                 .jwksUri("jwksUri")
                 .logoutEndpoint("logoutEndpoint")
                 .tokenEndpoint("tokenEndpoint")
                 .userInfoEndpoint("userInfoEndpoint")
                 // the properties below are optional
                 .authenticationRequestExtraParams(Map.of(
                         "authenticationRequestExtraParamsKey", "authenticationRequestExtraParams"))
                 .clientSecret("clientSecret")
                 .scope("scope")
                 .build())
         .sourceIpConfig(SourceIpConfigProperty.builder()
                 .cidrs(List.of("cidrs"))
                 .build())
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .workforceVpcConfig(WorkforceVpcConfigRequestProperty.builder()
                 .securityGroupIds(List.of("securityGroupIds"))
                 .subnets(List.of("subnets"))
                 .vpcId("vpcId")
                 .build())
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnWorkforce

      protected CfnWorkforce(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnWorkforce

      protected CfnWorkforce(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnWorkforce

      @Stability(Stable) public CfnWorkforce(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnWorkforceProps props)
      Create a new AWS::SageMaker::Workforce.

      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • arnForWorkforce

      @Stability(Stable) @NotNull public static String arnForWorkforce(@NotNull IWorkforceRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnWorkforce

      @Stability(Stable) @NotNull public static Boolean isCfnWorkforce(@NotNull Object x)
      Checks whether the given object is a CfnWorkforce.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrSubDomain

      @Stability(Stable) @NotNull public String getAttrSubDomain()
      The subdomain for your OIDC Identity Provider.
    • getAttrWorkforceArn

      @Stability(Stable) @NotNull public String getAttrWorkforceArn()
      The Amazon Resource Name (ARN) of the private workforce.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getCfnPropertyNames

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getWorkforceRef

      @Stability(Stable) @NotNull public WorkforceReference getWorkforceRef()
      A reference to a Workforce resource.
      Specified by:
      getWorkforceRef in interface IWorkforceRef
    • getWorkforceName

      @Stability(Stable) @NotNull public String getWorkforceName()
      The name of the private workforce.
    • setWorkforceName

      @Stability(Stable) public void setWorkforceName(@NotNull String value)
      The name of the private workforce.
    • getCognitoConfig

      @Stability(Stable) @Nullable public Object getCognitoConfig()
      The configuration of an Amazon Cognito workforce.

      Returns union: either IResolvable or CfnWorkforce.CognitoConfigProperty

    • setCognitoConfig

      @Stability(Stable) public void setCognitoConfig(@Nullable IResolvable value)
      The configuration of an Amazon Cognito workforce.
    • setCognitoConfig

      @Stability(Stable) public void setCognitoConfig(@Nullable CfnWorkforce.CognitoConfigProperty value)
      The configuration of an Amazon Cognito workforce.
    • getIpAddressType

      @Stability(Stable) @Nullable public String getIpAddressType()
      The IP address type for the workforce.
    • setIpAddressType

      @Stability(Stable) public void setIpAddressType(@Nullable String value)
      The IP address type for the workforce.
    • getOidcConfig

      @Stability(Stable) @Nullable public Object getOidcConfig()
      The configuration of an OIDC Identity Provider (IdP) private workforce.

      Returns union: either IResolvable or CfnWorkforce.OidcConfigProperty

    • setOidcConfig

      @Stability(Stable) public void setOidcConfig(@Nullable IResolvable value)
      The configuration of an OIDC Identity Provider (IdP) private workforce.
    • setOidcConfig

      @Stability(Stable) public void setOidcConfig(@Nullable CfnWorkforce.OidcConfigProperty value)
      The configuration of an OIDC Identity Provider (IdP) private workforce.
    • getSourceIpConfig

      @Stability(Stable) @Nullable public Object getSourceIpConfig()
      A list of IP address ranges used to access your training data.

      Returns union: either IResolvable or CfnWorkforce.SourceIpConfigProperty

    • setSourceIpConfig

      @Stability(Stable) public void setSourceIpConfig(@Nullable IResolvable value)
      A list of IP address ranges used to access your training data.
    • setSourceIpConfig

      @Stability(Stable) public void setSourceIpConfig(@Nullable CfnWorkforce.SourceIpConfigProperty value)
      A list of IP address ranges used to access your training data.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      An array of key-value pairs.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      An array of key-value pairs.
    • getWorkforceVpcConfig

      @Stability(Stable) @Nullable public Object getWorkforceVpcConfig()
      The VPC configuration for the workforce.

      Returns union: either IResolvable or CfnWorkforce.WorkforceVpcConfigRequestProperty

    • setWorkforceVpcConfig

      @Stability(Stable) public void setWorkforceVpcConfig(@Nullable IResolvable value)
      The VPC configuration for the workforce.
    • setWorkforceVpcConfig

      @Stability(Stable) public void setWorkforceVpcConfig(@Nullable CfnWorkforce.WorkforceVpcConfigRequestProperty value)
      The VPC configuration for the workforce.