@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:41.073Z") public class CfnConnection extends CfnResource implements IInspectable
Creates a connection. A connection defines the authorization type and credentials to use for authorization with an API destination HTTP endpoint.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.events.*; CfnConnection cfnConnection = CfnConnection.Builder.create(this, "MyCfnConnection") .authorizationType("authorizationType") .authParameters(AuthParametersProperty.builder() .apiKeyAuthParameters(ApiKeyAuthParametersProperty.builder() .apiKeyName("apiKeyName") .apiKeyValue("apiKeyValue") .build()) .basicAuthParameters(BasicAuthParametersProperty.builder() .password("password") .username("username") .build()) .invocationHttpParameters(ConnectionHttpParametersProperty.builder() .bodyParameters(List.of(ParameterProperty.builder() .key("key") .value("value") // the properties below are optional .isValueSecret(false) .build())) .headerParameters(List.of(ParameterProperty.builder() .key("key") .value("value") // the properties below are optional .isValueSecret(false) .build())) .queryStringParameters(List.of(ParameterProperty.builder() .key("key") .value("value") // the properties below are optional .isValueSecret(false) .build())) .build()) .oAuthParameters(OAuthParametersProperty.builder() .authorizationEndpoint("authorizationEndpoint") .clientParameters(ClientParametersProperty.builder() .clientId("clientId") .clientSecret("clientSecret") .build()) .httpMethod("httpMethod") // the properties below are optional .oAuthHttpParameters(ConnectionHttpParametersProperty.builder() .bodyParameters(List.of(ParameterProperty.builder() .key("key") .value("value") // the properties below are optional .isValueSecret(false) .build())) .headerParameters(List.of(ParameterProperty.builder() .key("key") .value("value") // the properties below are optional .isValueSecret(false) .build())) .queryStringParameters(List.of(ParameterProperty.builder() .key("key") .value("value") // the properties below are optional .isValueSecret(false) .build())) .build()) .build()) .build()) // the properties below are optional .description("description") .name("name") .build();
Modifier and Type | Class and Description |
---|---|
static interface |
CfnConnection.ApiKeyAuthParametersProperty
Contains the API key authorization parameters for the connection.
|
static interface |
CfnConnection.AuthParametersProperty
Contains the authorization parameters to use for the connection.
|
static interface |
CfnConnection.BasicAuthParametersProperty
Contains the Basic authorization parameters for the connection.
|
static class |
CfnConnection.Builder
A fluent builder for
CfnConnection . |
static interface |
CfnConnection.ClientParametersProperty
Contains the OAuth authorization parameters to use for the connection.
|
static interface |
CfnConnection.ConnectionHttpParametersProperty
Contains additional parameters for the connection.
|
static interface |
CfnConnection.OAuthParametersProperty
Contains the OAuth authorization parameters to use for the connection.
|
static interface |
CfnConnection.ParameterProperty
Additional query string parameter for the connection.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnConnection(Construct scope,
java.lang.String id,
CfnConnectionProps props)
Create a new `AWS::Events::Connection`.
|
protected |
CfnConnection(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnConnection(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrArn()
The ARN of the connection that was created by the request.
|
java.lang.String |
getAttrSecretArn()
The ARN for the secret created for the connection.
|
java.lang.String |
getAuthorizationType()
The type of authorization to use for the connection.
|
java.lang.Object |
getAuthParameters()
A `CreateConnectionAuthRequestParameters` object that contains the authorization parameters to use to authorize with the endpoint.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getDescription()
A description for the connection to create.
|
java.lang.String |
getName()
The name for the connection to create.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAuthorizationType(java.lang.String value)
The type of authorization to use for the connection.
|
void |
setAuthParameters(CfnConnection.AuthParametersProperty value)
A `CreateConnectionAuthRequestParameters` object that contains the authorization parameters to use to authorize with the endpoint.
|
void |
setAuthParameters(IResolvable value)
A `CreateConnectionAuthRequestParameters` object that contains the authorization parameters to use to authorize with the endpoint.
|
void |
setDescription(java.lang.String value)
A description for the connection to create.
|
void |
setName(java.lang.String value)
The name for the connection to create.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnConnection(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnConnection(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnConnection(Construct scope, java.lang.String id, CfnConnectionProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
public java.lang.String getAttrSecretArn()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.String getAuthorizationType()
OAUTH tokens are refreshed when a 401 or 407 response is returned.
public void setAuthorizationType(java.lang.String value)
OAUTH tokens are refreshed when a 401 or 407 response is returned.
public java.lang.Object getAuthParameters()
public void setAuthParameters(IResolvable value)
public void setAuthParameters(CfnConnection.AuthParametersProperty value)
public java.lang.String getDescription()
public void setDescription(java.lang.String value)
public java.lang.String getName()
public void setName(java.lang.String value)