Skip to content
v2.278.0

SourceProperty Struct ​

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_opsworks as opsworks } from 'aws-cdk-lib';
const sourceProperty: opsworks.CfnStack.SourceProperty = {
  password: 'password',
  revision: 'revision',
  sshKey: 'sshKey',
  type: 'type',
  url: 'url',
  username: 'username',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_opsworks as opsworks

source_property = opsworks.CfnStack.SourceProperty(
    password="password",
    revision="revision",
    ssh_key="sshKey",
    type="type",
    url="url",
    username="username"
)
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.opsworks.*;

SourceProperty sourceProperty = SourceProperty.builder()
        .password("password")
        .revision("revision")
        .sshKey("sshKey")
        .type("type")
        .url("url")
        .username("username")
        .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.OpsWorks;

var sourceProperty = new SourceProperty {
    Password = "password",
    Revision = "revision",
    SshKey = "sshKey",
    Type = "type",
    Url = "url",
    Username = "username"
};
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"

sourceProperty := &SourceProperty{
	Password: jsii.String("password"),
	Revision: jsii.String("revision"),
	SshKey: jsii.String("sshKey"),
	Type: jsii.String("type"),
	Url: jsii.String("url"),
	Username: jsii.String("username"),
}

Properties ​

passwordoptionalstringpasswordoptionalstrpasswordoptionalStringPasswordoptionalstringPasswordoptional*string #
When included in a request, the parameter depends on the repository type.
notes
  • For Amazon S3 bundles, set Password to the appropriate IAM secret access key.
  • For HTTP bundles and Subversion repositories, set Password to the password.

For more information on how to safely handle IAM credentials, see .

In responses, OpsWorks Stacks returns *****FILTERED***** instead of the actual value.

revisionoptionalstringrevisionoptionalstrrevisionoptionalStringRevisionoptionalstringRevisionoptional*string #
The application's version.

OpsWorks Stacks enables you to easily deploy new versions of an application. One of the simplest approaches is to have branches or revisions in your repository that represent different versions that can potentially be deployed.

sshKeyoptionalstringssh_keyoptionalstrsshKeyoptionalStringSshKeyoptionalstringSshKeyoptional*string #
The repository's SSH key.
notes

For more information, see Using Git Repository SSH Keys in the OpsWorks User Guide . To pass in an SSH key as a parameter, see the following example:

"Parameters" : { "GitSSHKey" : { "Description" : "Change SSH key newlines to commas.", "Type" : "CommaDelimitedList", "NoEcho" : "true" }, ... "CustomCookbooksSource": { "Revision" : { "Ref": "GitRevision"}, "SshKey" : { "Fn::Join" : [ "\n", { "Ref": "GitSSHKey"} ] }, "Type": "git", "Url": { "Ref": "GitURL"} } ...

typeoptionalstringtypeoptionalstrtypeoptionalStringTypeoptionalstringTypeoptional*string #
The repository type.
urloptionalstringurloptionalstrurloptionalStringUrloptionalstringUrloptional*string #
The source URL.

The following is an example of an Amazon S3 source URL: https://s3.amazonaws.com/opsworks-demo-bucket/opsworks_cookbook_demo.tar.gz .

usernameoptionalstringusernameoptionalstrusernameoptionalStringUsernameoptionalstringUsernameoptional*string #
This parameter depends on the repository type.
  • For Amazon S3 bundles, set Username to the appropriate IAM access key ID.
  • For HTTP bundles, Git repositories, and Subversion repositories, set Username to the user name.