Class ReplaceKey
Inheritance
System.Object
ReplaceKey
Namespace: Amazon.CDK.AWS.S3
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ReplaceKey : DeputyBase
Syntax (vb)
Public Class ReplaceKey
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
var bucket = new Bucket(this, "MyRedirectedBucket", new BucketProps {
WebsiteRoutingRules = new [] { new RoutingRule {
HostName = "www.example.com",
HttpRedirectCode = "302",
Protocol = RedirectProtocol.HTTPS,
ReplaceKey = ReplaceKey.PrefixWith("test/"),
Condition = new RoutingRuleCondition {
HttpErrorCodeReturnedEquals = "200",
KeyPrefixEquals = "prefix"
}
} }
});
Synopsis
Constructors
ReplaceKey(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
ReplaceKey(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
PrefixWithKey | |
WithKey |
Methods
PrefixWith(String) | The object key prefix to use in the redirect request. |
With(String) | The specific object key to use in the redirect request. |
Constructors
ReplaceKey(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected ReplaceKey(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
ReplaceKey(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected ReplaceKey(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
PrefixWithKey
public virtual string PrefixWithKey { get; }
Property Value
System.String
WithKey
public virtual string WithKey { get; }
Property Value
System.String
Methods
PrefixWith(String)
The object key prefix to use in the redirect request.
public static ReplaceKey PrefixWith(string keyReplacement)
Parameters
- keyReplacement System.String
Returns
With(String)
The specific object key to use in the redirect request.
public static ReplaceKey With(string keyReplacement)
Parameters
- keyReplacement System.String
Returns