Skip to content
v2.278.0

CfnWorkforceProps Struct ​

Properties for defining a CfnWorkforce.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sagemaker as sagemaker } from 'aws-cdk-lib';
const cfnWorkforceProps: sagemaker.CfnWorkforceProps = {
  workforceName: 'workforceName',

  // the properties below are optional
  cognitoConfig: {
    clientId: 'clientId',
    userPool: 'userPool',
  },
  ipAddressType: 'ipAddressType',
  oidcConfig: {
    authorizationEndpoint: 'authorizationEndpoint',
    clientId: 'clientId',
    issuer: 'issuer',
    jwksUri: 'jwksUri',
    logoutEndpoint: 'logoutEndpoint',
    tokenEndpoint: 'tokenEndpoint',
    userInfoEndpoint: 'userInfoEndpoint',

    // the properties below are optional
    authenticationRequestExtraParams: {
      authenticationRequestExtraParamsKey: 'authenticationRequestExtraParams',
    },
    clientSecret: 'clientSecret',
    scope: 'scope',
  },
  sourceIpConfig: {
    cidrs: ['cidrs'],
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
  workforceVpcConfig: {
    securityGroupIds: ['securityGroupIds'],
    subnets: ['subnets'],
    vpcId: 'vpcId',
  },
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sagemaker as sagemaker

cfn_workforce_props = sagemaker.CfnWorkforceProps(
    workforce_name="workforceName",

    # the properties below are optional
    cognito_config=sagemaker.CfnWorkforce.CognitoConfigProperty(
        client_id="clientId",
        user_pool="userPool"
    ),
    ip_address_type="ipAddressType",
    oidc_config=sagemaker.CfnWorkforce.OidcConfigProperty(
        authorization_endpoint="authorizationEndpoint",
        client_id="clientId",
        issuer="issuer",
        jwks_uri="jwksUri",
        logout_endpoint="logoutEndpoint",
        token_endpoint="tokenEndpoint",
        user_info_endpoint="userInfoEndpoint",

        # the properties below are optional
        authentication_request_extra_params={
            "authentication_request_extra_params_key": "authenticationRequestExtraParams"
        },
        client_secret="clientSecret",
        scope="scope"
    ),
    source_ip_config=sagemaker.CfnWorkforce.SourceIpConfigProperty(
        cidrs=["cidrs"]
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    workforce_vpc_config=sagemaker.CfnWorkforce.WorkforceVpcConfigRequestProperty(
        security_group_ids=["securityGroupIds"],
        subnets=["subnets"],
        vpc_id="vpcId"
    )
)
java
// 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.*;

CfnWorkforceProps cfnWorkforceProps = CfnWorkforceProps.builder()
        .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();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Sagemaker;

var cfnWorkforceProps = new CfnWorkforceProps {
    WorkforceName = "workforceName",

    // the properties below are optional
    CognitoConfig = new CognitoConfigProperty {
        ClientId = "clientId",
        UserPool = "userPool"
    },
    IpAddressType = "ipAddressType",
    OidcConfig = new OidcConfigProperty {
        AuthorizationEndpoint = "authorizationEndpoint",
        ClientId = "clientId",
        Issuer = "issuer",
        JwksUri = "jwksUri",
        LogoutEndpoint = "logoutEndpoint",
        TokenEndpoint = "tokenEndpoint",
        UserInfoEndpoint = "userInfoEndpoint",

        // the properties below are optional
        AuthenticationRequestExtraParams = new Dictionary<string, string> {
            { "authenticationRequestExtraParamsKey", "authenticationRequestExtraParams" }
        },
        ClientSecret = "clientSecret",
        Scope = "scope"
    },
    SourceIpConfig = new SourceIpConfigProperty {
        Cidrs = new [] { "cidrs" }
    },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    WorkforceVpcConfig = new WorkforceVpcConfigRequestProperty {
        SecurityGroupIds = new [] { "securityGroupIds" },
        Subnets = new [] { "subnets" },
        VpcId = "vpcId"
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnWorkforceProps := &CfnWorkforceProps{
	WorkforceName: jsii.String("workforceName"),

	// the properties below are optional
	CognitoConfig: &CognitoConfigProperty{
		ClientId: jsii.String("clientId"),
		UserPool: jsii.String("userPool"),
	},
	IpAddressType: jsii.String("ipAddressType"),
	OidcConfig: &OidcConfigProperty{
		AuthorizationEndpoint: jsii.String("authorizationEndpoint"),
		ClientId: jsii.String("clientId"),
		Issuer: jsii.String("issuer"),
		JwksUri: jsii.String("jwksUri"),
		LogoutEndpoint: jsii.String("logoutEndpoint"),
		TokenEndpoint: jsii.String("tokenEndpoint"),
		UserInfoEndpoint: jsii.String("userInfoEndpoint"),

		// the properties below are optional
		AuthenticationRequestExtraParams: map[string]*string{
			"authenticationRequestExtraParamsKey": jsii.String("authenticationRequestExtraParams"),
		},
		ClientSecret: jsii.String("clientSecret"),
		Scope: jsii.String("scope"),
	},
	SourceIpConfig: &SourceIpConfigProperty{
		Cidrs: []*string{
			jsii.String("cidrs"),
		},
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	WorkforceVpcConfig: &WorkforceVpcConfigRequestProperty{
		SecurityGroupIds: []*string{
			jsii.String("securityGroupIds"),
		},
		Subnets: []*string{
			jsii.String("subnets"),
		},
		VpcId: jsii.String("vpcId"),
	},
}

Properties ​

cognitoConfigoptionalIResolvable | CfnWorkforce.CognitoConfigPropertycognito_configoptionaltyping.Union[IResolvable, CognitoConfigProperty]cognitoConfigoptionalIResolvableCognitoConfigoptionalIResolvableCognitoConfigoptionalinterface{} #
The configuration of an Amazon Cognito workforce.

A single Cognito workforce is created using and corresponds to a single Amazon Cognito user pool.

ipAddressTypeoptionalstringip_address_typeoptionalstripAddressTypeoptionalStringIpAddressTypeoptionalstringIpAddressTypeoptional*string #
The IP address type for the workforce.

IPv4 only or dualstack (IPv4 and IPv6).

oidcConfigoptionalIResolvable | CfnWorkforce.OidcConfigPropertyoidc_configoptionaltyping.Union[IResolvable, OidcConfigProperty]oidcConfigoptionalIResolvableOidcConfigoptionalIResolvableOidcConfigoptionalinterface{} #
The configuration of an OIDC Identity Provider (IdP) private workforce.
sourceIpConfigoptionalIResolvable | CfnWorkforce.SourceIpConfigPropertysource_ip_configoptionaltyping.Union[IResolvable, SourceIpConfigProperty]sourceIpConfigoptionalIResolvableSourceIpConfigoptionalIResolvableSourceIpConfigoptionalinterface{} #
A list of IP address ranges used to access your training data.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
An array of key-value pairs.
workforceNamestringworkforce_namestrworkforceNameStringWorkforceNamestringWorkforceName*string required #
The name of the private workforce.
workforceVpcConfigoptionalIResolvable | CfnWorkforce.WorkforceVpcConfigRequestPropertyworkforce_vpc_configoptionaltyping.Union[IResolvable, WorkforceVpcConfigRequestProperty]workforceVpcConfigoptionalIResolvableWorkforceVpcConfigoptionalIResolvableWorkforceVpcConfigoptionalinterface{} #
The VPC configuration for the workforce.