How to use where clause in Knex
Create refunds with Stripe
Load HTML with Cheerio
How to send POST request with Axios
Find intersection of array in Lodash
Powered by Official white Bloop logo with a period

Terms / Privacy / Search / Support

  • // The code below shows an example of how to instantiate this type.
    // The values are placeholders you should change.
    import * as emr from '@aws-cdk/aws-emr';
    
    declare const configurationProperty_: emr.CfnInstanceFleetConfig.ConfigurationProperty;
    
    const cfnInstanceFleetConfig = new emr.CfnInstanceFleetConfig(this, 'MyCfnInstanceFleetConfig', {
      clusterId: 'clusterId',
      instanceFleetType: 'instanceFleetType',
    
      // the properties below are optional
      instanceTypeConfigs: [{
        instanceType: 'instanceType',
    
        // the properties below are optional
        bidPrice: 'bidPrice',
        bidPriceAsPercentageOfOnDemandPrice: 123,
        configurations: [{
          classification: 'classification',
          configurationProperties: {
            configurationPropertiesKey: 'configurationProperties',
          },
          configurations: [configurationProperty_],
        }],
        ebsConfiguration: {
          ebsBlockDeviceConfigs: [{
            volumeSpecification: {
              sizeInGb: 123,
              volumeType: 'volumeType',
    
              // the properties below are optional
              iops: 123,
            },
    
            // the properties below are optional
            volumesPerInstance: 123,
          }],
          ebsOptimized: false,
        },
        weightedCapacity: 123,
      }],
      launchSpecifications: {
        onDemandSpecification: {
          allocationStrategy: 'allocationStrategy',
        },
        spotSpecification: {
          timeoutAction: 'timeoutAction',
          timeoutDurationMinutes: 123,
    
          // the properties below are optional
          allocationStrategy: 'allocationStrategy',
          blockDurationMinutes: 123,
        },
      },
      name: 'name',
      targetOnDemandCapacity: 123,
      targetSpotCapacity: 123,
    });
    
    Docs
    0
  • new tasks.EmrModifyInstanceFleetByName(this, 'Task', {
      clusterId: 'ClusterId',
      instanceFleetName: 'InstanceFleetName',
      targetOnDemandCapacity: 2,
      targetSpotCapacity: 0,
    });
    
    Docs
    0
  • new tasks.EmrModifyInstanceGroupByName(this, 'Task', {
      clusterId: 'ClusterId',
      instanceGroupName: sfn.JsonPath.stringAt('$.InstanceGroupName'),
      instanceGroup: {
        instanceCount: 1,
      },
    });
    
    Docs
    0
  • new tasks.EmrCreateCluster(this, 'Create Cluster', {
      instances: {},
      name: sfn.TaskInput.fromJsonPathAt('$.ClusterName').value,
      stepConcurrencyLevel: 10,
    });
    
    Docs
    0
  • const clusterRole = new iam.Role(this, 'ClusterRole', {
      assumedBy: new iam.ServicePrincipal('ec2.amazonaws.com'),
    });
    
    const serviceRole = new iam.Role(this, 'ServiceRole', {
      assumedBy: new iam.ServicePrincipal('elasticmapreduce.amazonaws.com'),
    });
    
    const autoScalingRole = new iam.Role(this, 'AutoScalingRole', {
      assumedBy: new iam.ServicePrincipal('elasticmapreduce.amazonaws.com'),
    });
    
    autoScalingRole.assumeRolePolicy?.addStatements(
      new iam.PolicyStatement({
        effect: iam.Effect.ALLOW,
        principals: [
          new iam.ServicePrincipal('application-autoscaling.amazonaws.com'),
        ],
        actions: [
          'sts:AssumeRole',
        ],
      }));
    )
    
    new tasks.EmrCreateCluster(this, 'Create Cluster', {
      instances: {},
      clusterRole,
      name: sfn.TaskInput.fromJsonPathAt('$.ClusterName').value,
      serviceRole,
      autoScalingRole,
    });
    
    Docs
    0
  • new tasks.EmrTerminateCluster(this, 'Task', {
      clusterId: 'ClusterId',
    });
    
    Docs
    0
  • Powered by Official black Bloop logo with a period
    download the IDE extension

    View other examples