AWSCredentials

Objective-C

@interface AWSCredentials : NSObject <NSCopying>

Swift

class AWSCredentials : NSObject, NSCopying

An AWS credentials container class.

  • Access Key component of credentials.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) NSString *_Nonnull accessKey;

    Swift

    var accessKey: String { get }
  • Secret Access Key component of credentials.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) NSString *_Nonnull secretKey;

    Swift

    var secretKey: String { get }
  • Session Token component of credentials.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) NSString *sessionKey;

    Swift

    var sessionKey: String? { get }
  • Date at which these credentials will expire.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) NSDate *expiration;

    Swift

    var expiration: Date? { get }
  • Initiates an AWS credentials object.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithAccessKey:(nonnull NSString *)accessKey
                                    secretKey:(nonnull NSString *)secretKey
                                   sessionKey:(nullable NSString *)sessionKey
                                   expiration:(nullable NSDate *)expiration;

    Swift

    init(accessKey: String, secretKey: String, sessionKey: String?, expiration: Date?)

    Parameters

    accessKey

    An AWS Access key.

    secretKey

    An AWS Secret key.

    sessionKey

    An AWS Session key.

    expiration

    The expiration date of the temporary AWS credentials.

    Return Value

    An AWS credentials object.