Class: AWSCDK::CodeBuild::CfnSourceCredentialProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CodeBuild::CfnSourceCredentialProps
- Defined in:
- code_build/cfn_source_credential_props.rb
Overview
Properties for defining a CfnSourceCredential.
Instance Attribute Summary collapse
-
#auth_type ⇒ String
readonly
The type of authentication used by the credentials.
-
#server_type ⇒ String
readonly
The type of source provider.
-
#token ⇒ String
readonly
For GitHub or GitHub Enterprise, this is the personal access token.
-
#username ⇒ String?
readonly
The Bitbucket username when the
authTypeis BASIC_AUTH.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(auth_type:, server_type:, token:, username: nil) ⇒ CfnSourceCredentialProps
constructor
A new instance of CfnSourceCredentialProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(auth_type:, server_type:, token:, username: nil) ⇒ CfnSourceCredentialProps
Returns a new instance of CfnSourceCredentialProps.
13 14 15 16 17 18 19 20 21 22 |
# File 'code_build/cfn_source_credential_props.rb', line 13 def initialize(auth_type:, server_type:, token:, username: nil) @auth_type = auth_type Jsii::Type.check_type(@auth_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "authType") @server_type = server_type Jsii::Type.check_type(@server_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serverType") @token = token Jsii::Type.check_type(@token, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "token") @username = username Jsii::Type.check_type(@username, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "username") unless @username.nil? end |
Instance Attribute Details
#auth_type ⇒ String (readonly)
The type of authentication used by the credentials.
Valid options are OAUTH, BASIC_AUTH, PERSONAL_ACCESS_TOKEN, CODECONNECTIONS, or SECRETS_MANAGER.
30 31 32 |
# File 'code_build/cfn_source_credential_props.rb', line 30 def auth_type @auth_type end |
#server_type ⇒ String (readonly)
The type of source provider.
The valid options are GITHUB, GITHUB_ENTERPRISE, GITLAB, GITLAB_SELF_MANAGED, or BITBUCKET.
37 38 39 |
# File 'code_build/cfn_source_credential_props.rb', line 37 def server_type @server_type end |
#token ⇒ String (readonly)
For GitHub or GitHub Enterprise, this is the personal access token.
For Bitbucket, this is either the access token or the app password. For the auth_type CODECONNECTIONS, this is the connection_arn . For the auth_type SECRETS_MANAGER, this is the secret_arn .
44 45 46 |
# File 'code_build/cfn_source_credential_props.rb', line 44 def token @token end |
#username ⇒ String? (readonly)
The Bitbucket username when the authType is BASIC_AUTH.
This parameter is not valid for other types of source providers or connections.
51 52 53 |
# File 'code_build/cfn_source_credential_props.rb', line 51 def username @username end |
Class Method Details
.jsii_properties ⇒ Object
53 54 55 56 57 58 59 60 |
# File 'code_build/cfn_source_credential_props.rb', line 53 def self.jsii_properties { :auth_type => "authType", :server_type => "serverType", :token => "token", :username => "username", } end |
Instance Method Details
#to_jsii ⇒ Object
62 63 64 65 66 67 68 69 70 71 |
# File 'code_build/cfn_source_credential_props.rb', line 62 def to_jsii result = {} result.merge!({ "authType" => @auth_type, "serverType" => @server_type, "token" => @token, "username" => @username, }) result.compact end |