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

  • const oauth = cdk.SecretValue.secretsManager('my-github-token');
    
    Docs
    0
  • const amplifyApp = new amplify.App(this, 'MyApp', {
      repository: 'https://github.com/<user>/<repo>',
      oauthToken: cdk.SecretValue.secretsManager('my-github-token'),
      autoBranchCreation: { // Automatically connect branches that match a pattern set
        patterns: ['feature/*', 'test/*']
      }
      autoBranchDeletion: true, // Automatically disconnect a branch when you delete a branch from your repository
    });
    
    Docs
    0
  • pipelines.CodePipelineSource.gitHub('org/repo', 'branch', {
      // This is optional
      authentication: cdk.SecretValue.secretsManager('my-token'),
    });
    
    Docs
    0
  • const amplifyApp = new amplify.App(stack, 'App', {
      sourceCodeProvider: new amplify.GitHubSourceCodeProvider({
        owner: '<user>',
        repository: '<repo>',
        oauthToken: cdk.SecretValue.secretsManager('my-github-token')
      }),
      customResponseHeaders: [
        {
          pattern: '*.json',
          headers: {
            'custom-header-name-1': 'custom-header-value-1',
            'custom-header-name-2': 'custom-header-value-2',
          },
        },
        {
          pattern: '/path/*',
          headers: {
            'custom-header-name-1': 'custom-header-value-2',
          },
        },
      ],
    });
    
    Docs
    0
  • import * as codestar from '@aws-cdk/aws-codestar';
    import * as s3 from '@aws-cdk/aws-s3'
    
    new codestar.GitHubRepository(stack, 'GitHubRepo', {
      owner: 'aws',
      repositoryName: 'aws-cdk',
      accessToken: cdk.SecretValue.secretsManager('my-github-token', {
        jsonField: 'token',
      }),
      contentsBucket: s3.Bucket.fromBucketName(stack, 'Bucket', 'bucket-name'),
      contentsKey: 'import.zip',
    });
    
    Docs
    0
  • declare const secret: secretsmanager.Secret;
    declare const parameter: ssm.StringParameter;
    
    const taskDefinition = new ecs.Ec2TaskDefinition(this, 'TaskDef');
    taskDefinition.addContainer('TheContainer', {
      image: ecs.ContainerImage.fromRegistry('example-image'),
      memoryLimitMiB: 256,
      logging: ecs.LogDrivers.firelens({
        options: {
          // ... log driver options here ...
        },
        secretOptions: { // Retrieved from AWS Secrets Manager or AWS Systems Manager Parameter Store
          apikey: ecs.Secret.fromSecretsManager(secret),
          host: ecs.Secret.fromSsmParameter(parameter),
        },
      }),
    });
    
    Docs
    0
  • declare const secret: secretsmanager.Secret;
    declare const dbSecret: secretsmanager.Secret;
    declare const parameter: ssm.StringParameter;
    declare const taskDefinition: ecs.TaskDefinition;
    declare const s3Bucket: s3.Bucket;
    
    taskDefinition.addContainer('container', {
      image: ecs.ContainerImage.fromRegistry("amazon/amazon-ecs-sample"),
      memoryLimitMiB: 1024,
      environment: { // clear text, not for sensitive data
        STAGE: 'prod',
      },
      environmentFiles: [ // list of environment files hosted either on local disk or S3
        ecs.EnvironmentFile.fromAsset('./demo-env-file.env'),
        ecs.EnvironmentFile.fromBucket(s3Bucket, 'assets/demo-env-file.env'),
      ],
      secrets: { // Retrieved from AWS Secrets Manager or AWS Systems Manager Parameter Store at container start-up.
        SECRET: ecs.Secret.fromSecretsManager(secret),
        DB_PASSWORD: ecs.Secret.fromSecretsManager(dbSecret, 'password'), // Reference a specific JSON field, (requires platform version 1.4.0 or later for Fargate tasks)
        PARAMETER: ecs.Secret.fromSsmParameter(parameter),
      },
    });
    
    Docs
    0
  •     // Default secret
        const secret = new secretsmanager.Secret(this, 'Secret');
        secret.grantRead(role);
    
        new iam.User(this, 'User', {
          password: secret.secretValue,
        });
    
        // Templated secret
        const templatedSecret = new secretsmanager.Secret(this, 'TemplatedSecret', {
          generateSecretString: {
            secretStringTemplate: JSON.stringify({ username: 'user' }),
            generateStringKey: 'password',
          },
        });
    
        new iam.User(this, 'OtherUser', {
          userName: templatedSecret.secretValueFromJson('username').toString(),
          password: templatedSecret.secretValueFromJson('password'),
        });
    
    Docs
    0
  •     // Default secret
        const secret = new secretsmanager.Secret(this, 'Secret');
        secret.grantRead(role);
    
        new iam.User(this, 'User', {
          password: secret.secretValue,
        });
    
        // Templated secret
        const templatedSecret = new secretsmanager.Secret(this, 'TemplatedSecret', {
          generateSecretString: {
            secretStringTemplate: JSON.stringify({ username: 'user' }),
            generateStringKey: 'password',
          },
        });
    
        new iam.User(this, 'OtherUser', {
          userName: templatedSecret.secretValueFromJson('username').toString(),
          password: templatedSecret.secretValueFromJson('password'),
        });
    
    Docs
    0
  •     const user = new User(this, 'MyUser', { password: cdk.SecretValue.plainText('1234') });
        const group = new Group(this, 'MyGroup');
    
        const policy = new Policy(this, 'MyPolicy');
        policy.attachToUser(user);
        group.attachInlinePolicy(policy);
    
    Docs
    0
  • Powered by Official black Bloop logo with a period
    download the IDE extension

    View other examples